You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
#1082 and user location display on the map introduces -zoomToSouthWestCoordinate:northEastCoordinate:animated: brought over from the iOS SDK. We should settle on whether we will use this approach or a more singular structure like MapKit's MKRegion. Then, we should expose these methods publicly for general use as well for things like zooming to an array of annotations (the reason the new annotations don't have this yet).
#1655 is bringing in a LatLngBounds struct that we can use here. I think we should stick to coordinates like this rather than use another layer of abstraction like MapKit does (MKMapPoint & friends). I'll hit this when shapes land.
Downside to not using an abstraction layer like MKMapPoint is that what we are specifying in "bounds" are actually spherical trapeziums, like how we do in the raster SDK, i.e. this is a shape that doesn't not have straight lines on the sides and the top and bottom edges are not the same length.
I don't think this is a problem in practice, but it does get into interesting territory when it comes to determining intersections and overlaps.
Coming along with the addition of this API would be something like MapKit's -showAnnotations:animated:, which allows passing annotation objects for viewport setting, which is super handy.
This isn't trivial, though, since you need to determine the region with regard to the view's current aspect ratio as well as possibly inset/offset padding.
I think we should stick to coordinates like this rather than use another layer of abstraction like MapKit does (MKMapPoint & friends).
MapKit’s geometry data types are named in parallel with Core Graphics geometry data types (MKMapPoint is to CGPoint as MKMapSize is to CGSize as MKMapRect is to CGRect). It’s elegant, but I agree that the additional level of abstraction isn’t necessary at this point.
Activity
incanus commentedon Jun 1, 2015
#1655 is bringing in a
LatLngBoundsstruct that we can use here. I think we should stick to coordinates like this rather than use another layer of abstraction like MapKit does (MKMapPoint& friends). I'll hit this when shapes land.incanus commentedon Jun 2, 2015
Downside to not using an abstraction layer like
MKMapPointis that what we are specifying in "bounds" are actually spherical trapeziums, like how we do in the raster SDK, i.e. this is a shape that doesn't not have straight lines on the sides and the top and bottom edges are not the same length.I don't think this is a problem in practice, but it does get into interesting territory when it comes to determining intersections and overlaps.
incanus commentedon Jun 2, 2015
Coming along with the addition of this API would be something like MapKit's
-showAnnotations:animated:, which allows passing annotation objects for viewport setting, which is super handy.incanus commentedon Jun 8, 2015
This isn't trivial, though, since you need to determine the region with regard to the view's current aspect ratio as well as possibly inset/offset padding.
friedbunny commentedon Jun 10, 2015
Per #1433,
-zoomToSouthWestCoordinate:northEastCoordinate:animated:is bork right now and doesn't behave as it should.1ec5 commentedon Jun 23, 2015
This method should also be refactored to use MGLCoordinateBounds, which was introduced in #1655.
1ec5 commentedon Jun 23, 2015
MapKit’s geometry data types are named in parallel with Core Graphics geometry data types (MKMapPoint is to CGPoint as MKMapSize is to CGSize as MKMapRect is to CGRect). It’s elegant, but I agree that the additional level of abstraction isn’t necessary at this point.