It’s been talked about in the Canadian media for some time now, but, as Google LatLong reported yesterday, Google Maps’s bicycling layer for Canadian cities — Calgary, Edmonton, Kelowna, Vancouver, Winnipeg, Kitchener-Waterloo-Cambridge, Ottawa-Gatineau (including a bike trail out in my area), and Toronto — is now live. The bike routes are colour-coded: “Dark green indicates a dedicated bike-only trail; lighter green indicates a dedicated bike lane along a road; and the dotted green line indicates roads that do not have bike lanes but tend to be suitable for biking.”
Since being formalized as an Open Geospatial Consortium standard, KML has become something of a lingua franca for geospatial information. From humble beginnings in Google Earth, KML support can now be found in a wide variety of mapping products and services. Today we’re happy to add Maps API v3 to this list with the introduction of the new
KmlLayer class. The
KmlLayer class enables KML or GeoRSS files that are hosted on publicly accessible web sites to be rendered in a Maps API v3 application.
KmlLayer class is just one of several new layer classes we’re adding to Maps API v3 today. A layer class handles a collection of overlays that are added to the map as a single entity. In addition to the
KmlLayer class, we are also adding a
TrafficLayer class and a
TrafficLayer class adds real time color coding of traffic speed on highways and major arterial roads. The
BicyclingLayer class adds information about bike trails, lanes and recommended roads for bicyling onto the map:
- A dark green line indicates a dedicated bike-only trail;
- A light green line indicates a dedicated bike lane along a road;
- A dashed green line indicates roads that are designated as preferred for bicycling, but without dedicated lanes
If you generate bicycling routes using the
DirectionsService class, and display them on the map using a
BicyclingLayer is now added to the map with the route.
You can use the map below to try out these new layers and check how your own KML files are rendered by the
If you have any questions about these new layers, or the Maps API v3 in general, we recommend that you join the Maps API v3 Google Group. For more information about KML, check out the KML Tutorial.
Posted by Thor Mitchell, Maps API Product Manager