Thursday, January 6, 2011

Introducing Google Map Libraries

Google Maps Javascript API V3 Geometry Library

One of the initial aims of V3 of the Google Maps API was to minimise the time it takes to load and display a Google Map. However if new features are added to the API and it grows in size the load time of the JavaScript grows as well.

The Google Maps team have therefore decided to implement libraries for the API. A library is a set of Maps API features that are only loaded when explicitly requested by the application. This request is added to the call to load the API, e.g.,

http://maps.google.com/maps/api/js?libraries=geometry

The Geometry Library is the first library to be added to the Google Maps API V3. The geometry library provides a set of utility functions for performing distance, heading, and area calculations in a spherical geometry, such as on the surface of the Earth, and also provides functions for handling encoded polylines.

Ed Parsons has provided a good explanation of why and how you might want to use the Geometry Library in a post called 'Because the world is not flat...'. You can also examine the library in more detail in the Maps API Documentation and Reference.

Via: Google Geo Developers Blog

________________

0 comments:

Post a Comment

Blog Archive

 
Best Retirement Invesments