Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LatLng ⇢ LngLat #1433

Merged
merged 1 commit into from
Aug 14, 2015
Merged

LatLng ⇢ LngLat #1433

merged 1 commit into from
Aug 14, 2015

Conversation

jfirebaugh
Copy link
Contributor

Switched to [longitude, latitude] coordinate order, matching GeoJSON. We anticipate that mapbox-gl-js will be widely used with GeoJSON, and in the long term having a coordinate order that is consistent with GeoJSON will lead to less confusion and impedence mismatch than will a [latitude, longitude] order.

The following APIs were renamed:

  • LatLng was renamed to LngLat
  • LatLngBounds was renamed to LngLatBounds
  • Popup#setLatLng was renamed to Popup#setLngLat
  • Popup#getLatLng was renamed to Popup#getLngLat
  • The latLng property of Map events was renamed lngLat

The following APIs now expect array coordinates in [longitude, latitude] order:

  • LngLat.convert
  • LngLatBounds.convert
  • Popup#setLngLat
  • The center and maxBounds options of the Map constructor
  • The arguments to Map#setCenter, Map#fitBounds, Map#panTo, and Map#project
  • The center option of Map#jumpTo, Map#easeTo, and Map#flyTo
  • The around option of Map#zoomTo, Map#rotateTo, and Map#easeTo
  • The coordinates properties of video and image sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant