->

08 January 2007

Drive More Traffic to Your Maps API Site - Include KML Files

From the Offical Maps API Blog

)

Publishing a KML Sitemap involves a few easy steps:

  • Identify those features on your maps site which can be displayed as KML features.
  • Convert those features into KML equivalents and publish them within one or more KML files.
  • Create a sitemap.xml file that identifies links to all of your KML files.
  • Place the sitemap.xml in the root directory of your site.
More Information here

A simple sitemap.xml example

Sitemap XML Examples
Note:Sitemap.xml files must have no more than 50,000 URLs
and must not be larger than
10MB

Mapperz RSS Feed

Mapperz

Labels: , , ,

26 November 2006

Google Maps Directions via KML Google Earth

Some google mappers have noticed that you can create kml files from google maps
Directions SW1 to SW2 on Google Maps

Example directions from SW1 to SW2 in London
http://maps.google.co.uk/maps?q=from+SW1+to+SW2

to create the kml simply add '&output=kml' to the end of the url in google maps
http://maps.google.co.uk/maps?q=from+SW1+to+SW2&output=kml

This will create a kml file for you to either save or open in Google Earth.
Directions SW1 to SW2 in Google Earth
Now for the clever bit, as google maps api does not support directions.

copy the file and rename it .xml and not .kml

if you have a webserver you can upload, like here
http://mapperz.110mb.com/GMAP/maps.xml

then create a page with your route like this

http://mapperz.110mb.com/GMAP/kml_to_xml.htm


KML (keyhole markup language) a google earth format (which is xml) which allows users to create directions from google maps (not the api).


110mb.com is a free hosting service that supports mysql and php.
(but does not allow cross domain parsing of javascript - for security issues)

Thanks to Mike Williams web page.

Labels: , , ,