I’ve been getting a lot of questions lately about when I was going to release part 2 of my Google Maps for SEO API tutorial. Well, here it is! and I have made it more simple than ever. In this tutorial, I have included a simple KML file for your viewing to see how to set yours up. I have also included the snippet needed in order to call the KML in the API on your website.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </Point> </Placemark> </kml>
Now you can see how the KML file is suppose to look, you can add as many different locations as you want within the kml file. just add an additional <placemark> and you’re good to go. I recommend creating additional fields within the KML placemark including <address> <street><state><zip> etc. By doing this you will let google know more accurate information about what you’re trying to show on the map and will also increase SEO information and bait for the search engines. If you know basic html, you can also add image or hyperlinks to the code. ( NOTE: in order to add this type of information or any other html markup, you must use CDATA in your XML KML.) The coordinates are great and required, but additional information is key to success for any SEO. I have found great success doing this for a string of tire dealerships on the east coast. I did not design the website, but i did implement the Google Maps SEO.
Example 2:<Placemark> <name>Edinburgh</name> <description><![CDATA[<div><a href="http://localtiredealers.net/kramer/locations-hours/edinburgh.html">221 Carmichael Way <br> Chesapeake, VA 23322 </b></a> </div><div><img src="http://www.yourthinkbox.com/ifc/coupons/chesapeake.jpg" width="200px" border="0"></a></div>]]></description> <styleUrl>#C</styleUrl> <Point><coordinates>-76.234312,36.65978,0</coordinates></Point> </Placemark>
From there, You’ll use your typical map settings (refer to part 1 of my tutorial) and add the overlay of the KML file you created.
var gx = new GGeoXml(“http://www.website.kml”);map.addOverlay(gx);
check back soon because I will be posting a tutorial on how to easily place google maps into wordpress for SEO best practices.