xml Google Maps Wordpress plugin

February 21, 2009 by Don C  
Filed under Etcetera

Just playing around with embedding Google Maps into my blog. Here is Google map displayed with an iframe:


View Larger Map

With more recent satellite imagery you would see my kayaks on this map if you zoomed in a bit.

iframe is another tag that for security reasons Wordpress Mu filters out of any content, similar to the embed tag discussed here. I made the hack necessary to embed stuff and then made an additional hack to the hack to allow for the iframe tag.

To get iframes to work in wpmu I appended the following onto the end of the array defined in the ‘Allow Embeded Video’ plugin’s php file and voila the iframe links copied directly from Google MyMaps works:

 'iframe' => array(
        'width' => array(),
        'height' => array(),
	'frameborder' => array(),
	'scrolling' => array(),
	'marginheight' => array(),
	'marginwidth' => array(),
	'src' => array(),
	)

Now instead of making my maps with an image editor I can lay in any Google map I want as well as integrate GPS applications like geo-caching, route tracking, etc, etc. So cool.

After getting the iframes to work I looked into the xml Google Maps plugin and since it doesn’t use iframes you don’t have to open up the potential security hole by allowing the iframe tag. Just paste in a link to a GPX or KML file and the xml Google Maps plugin automatically converts the file to a google map and injects it into the post. Here is a google map published with the xml Google Map plugin using a simple anchor tag:

A nice 5.5 mi paddle with many photo opportunities

  • Share/Bookmark