Skip to content

Commit

Permalink
Merge branch 'feature/custom-coordinate-span'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zandor300 committed Nov 29, 2021
2 parents 188cc07 + f360603 commit 72c971d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/AppleMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ class AppleMaps extends Component {
}

setMainCoords() {
const { longitude, latitude } = this.props
const { longitude, latitude, spanLat, spanLong } = this.props
const mainCoords = new mapkit.CoordinateRegion(
new mapkit.Coordinate(latitude, longitude),
new mapkit.CoordinateSpan(this.zoomLevel(), this.zoomLevel())
new mapkit.CoordinateSpan(spanLat ? spanLat : this.zoomLevel(), spanLong ? spanLong : this.zoomLevel())
)
this.map.region = mainCoords
}
Expand Down

0 comments on commit 72c971d

Please sign in to comment.