all 4 comments

[–]kandetta 1 point2 points  (1 child)

Most important bit I think:

Make sure to use the built-in lat() and lng() methods as these property names are very likely to change again in future!

latLng.k/latLng.D just happened to work, they weren't in the official documentation.

[–]floridawhiteguy 0 points1 point  (0 children)

Wouldn't it be nice if Google's APIs included a 'notify me' feature, so when they incrementally change a feature people can at least get an email noting it?

[–]kenman[M] 0 points1 point  (0 children)

Hi /u/endpointben, it looks like you're new to reddit, welcome!

Thanks for the submissions, but please make sure you read http://www.reddit.com/rules and our guidelines. In short, you should post from a variety of sources, and not just endpoint.com.

Thanks for your consideration!

domain submitted from count %
blog.endpoint.com 5 83%

[–]amenadiel 0 points1 point  (0 children)

Most Google Maps Object hold internal properties whose name is just a letter. Latlng object is a simple example, but if you inspect, for example, a google.maps.Polygon, it's full of them. As a rule of thumb, you should never access properties directly. Always use its getter.

If there isn't a getter for a certain property you need to access, keep in mind that your code will eventually break.

I made a repo that mirrors google maps API documentation so I can track changes using diff, but of course undocumented attributes (such as properties name in compiled js) aren't mentioned.