[ad_1]
So I have been combating this for a while. I want to know the CGRect of the entire map. The difficulty I’m going through proper now could be that as a result of wrapping of the map, the x of the top-left coordinate retains switching between a unfavourable and a optimistic worth as I transfer across the map. This ends in the width of the map additionally altering.
I attempted proscribing the digital camera bounds to forestall wrapping and it does that job completely, but it surely nonetheless would not assist with x switching between optimistic/unfavourable as I transfer across the map.
let extremeBounds = CoordinateBounds(
southwest: CLLocationCoordinate2D(latitude: -62.59334083012023, longitude: -141.328125),
northeast: CLLocationCoordinate2D(latitude: 82.85338229176081, longitude: 167.34375)
)
strive? view.mapboxMap.setCameraBounds(with: CameraBoundsOptions(bounds: extremeBounds))
That is how I’m calculating the rect on cameraChange:
mapView.mapboxMap.rect(for: self.extremeBounds)
Is there an official means of disabling the wrapping of the map in order that the northwest coordinate at all times seems on the prime left facet of the map? Or possibly my method is inaccurate and there is a better means of discovering out the rect of the map?
[ad_2]
