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.
"LatLngZoom" & "Coordinate": do they mean the same thing? #3309
Our external-facing API has Map.setCenterCoordinate(LatLngZoom) that dispatches to Map.setLatLng and Map.setLatLngZoom. We don't have a class called 'Coordinate' anywhere.
Should LatLng be derived from a Coordinate class? Should it be renamed Coordinate? The two names seem to correspond to the same thing.
I'm not really sure where the naming of setCenterCoordinate comes from. Using setLatLng would make more sense over setCenterCoordinate. For parity with iOS and Google maps I'm suggesting to keep LatLng and remove Coordinate references.
Google Maps
I'm seeing that Google Maps SDK is using a Camera object for this.
I'm not really sure where the naming of setCenterCoordinate comes from.
I did some sleuthing and found that it comes from 5-Nov-2014.... aka "the first Android PR". It's odd as usually there's been a one to one mapping between MapView.java and NativeMapView.java for Core GL methods (which will be changing as we continue to mirror the Google Maps API). Perhaps this was just a more "human friendly" name?
Regardless, let's move away from this now. With the Mapbox Camera API now in, we can mirror Google's approach by using moveCamera(). The only thing that will have to be managed is the removal of setCenterCoordinate() from MapView as setLanLng() and setLatLngZoom() are both only in NativeMapView which is not accessible. This is not a big deal at all, but it will cause a SemVer major version to be needed.
@tobrun Since #3145 is a bit of a bigger lift that may or may not be ready by the time we're ready to release the next PROD version of the SDK let's knock this issue out first as getting things named consistently is important. Cool?
Activity
tobrun commentedon Dec 18, 2015
Center Coordinate
I'm not really sure where the naming of
setCenterCoordinatecomes from. UsingsetLatLngwould make more sense oversetCenterCoordinate. For parity with iOS and Google maps I'm suggesting to keepLatLngand removeCoordinatereferences.Google Maps
I'm seeing that Google Maps SDK is using a Camera object for this.
@bleege
Side note
I want to add to this discussion we are sometimes calling a LatLng instance
point:This is something that needs to be changed as well.
@tmcw thank you for this valuable feedback, always good to have some extra 👀
bleege commentedon Dec 22, 2015
I did some sleuthing and found that it comes from 5-Nov-2014.... aka "the first Android PR". It's odd as usually there's been a one to one mapping between
MapView.javaandNativeMapView.javafor Core GL methods (which will be changing as we continue to mirror the Google Maps API). Perhaps this was just a more "human friendly" name?Regardless, let's move away from this now. With the Mapbox Camera API now in, we can mirror Google's approach by using
moveCamera(). The only thing that will have to be managed is the removal ofsetCenterCoordinate()fromMapViewassetLanLng()andsetLatLngZoom()are both only inNativeMapViewwhich is not accessible. This is not a big deal at all, but it will cause a SemVer major version to be needed.tobrun commentedon Jan 8, 2016
This will be resolved if #3145 lands
bleege commentedon Jan 8, 2016
@tobrun Since #3145 is a bit of a bigger lift that may or may not be ready by the time we're ready to release the next PROD version of the SDK let's knock this issue out first as getting things named consistently is important. Cool?
tobrun commentedon Jan 12, 2016
Agreed, will pick this up now
[android] #3309 - replace coordinate naming with LatLng