Showing posts with label API V3 Libraries. Show all posts
Showing posts with label API V3 Libraries. Show all posts

Tuesday, May 24, 2011

Introducing the Google Maps Label Library

MapLabel Utility Library

MapLabel is a very nice utility library for the Google Maps API that allows you to add labels to Google Maps.

Labels created with the utility are dynamically rendered on Google Maps using Canvas 2D. Developers can define the font size, the font face, color and alignment of the labels. I've created a demo of the library in action here, which (at the risk of seeming obsessive) places labels on a map of the 2012 London Olympics site.

One really useful feature in the library is the maxZoom and minZoom controls. These let you define at what zoom levels labels should be visible. In my example map above if you zoom in on the Westfield Shopping Mall the 'Westfield Shopping Mall' label disappears and a number of other labels become visible, showing the locations of individual stores.

If you want to know more check out the reference documents and the source code.

_________________

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

________________

Blog Archive

 
Best Retirement Invesments