Skip to content

Improved convertLatLng

Compare
Choose a tag to compare
@NotWoods NotWoods released this 18 Aug 02:22
c7bc03b

Here is the first release with breaking changes. The changes are primarily internal and it is unlikely you'll encounter breaking changes.

  • convertLatLng now checks the entire prototype chain ('lat' in obj) rather than checking if an object has its own property (obj.hasOwnProperty('lat')). This allows convertLatLng to work with Javascript Coordinates returned by the Geolocation API.
  • convertLatLng will throw a TypeError if it cannot convert an object. Previously it returned undefined.
  • convertLatLng previously took a second parameter that could override the class constructor used. This behaviour was deprecated and is now removed.
  • LatLng previously stored the latitude and longitude as symbols. They are now stored as latitude and longitude properties (replacing the getters).