Following the addition of GeoRSS, earlier today while out photographing some PhotoSpots (TBA), I had an even better (possibly) idea, now that my WordPress stores Lat/Long, why not output KML too! The icing on the cake is you can also wrap it in a NetworkLink so that peoples Google Earth will auto update. (I am surprised couldn’t find this done already!)
And if that isn’t enough then I also release the code under GPL – note its the first time written anything for WordPress, so might not be a tidy as could be!
Anyway see it in action on my series of PhotoSpots:
- as all these list the PhotoSpot category, each post includes a link to open the actual spot, so just click the world icon in the balloon to open
Download the Source or view the source: WordPress KML Generator and NetworkLink Wrapper
Installation: This is not a proper plugin, so just drop the .php files into the root of your WordPress folder and you should be done (but you can configure the icon to display if you wish by editing the wp-kml.php file)
Use: Normally you would only provide a link to the Wrapper – which in turn links to the feed itself, but the feed is useful like in the above example to plot directly on Google Maps. You can also specify a particular category to display like the above example or otherwise will include all geocoded posts.
Important: Requires the GeoPress extension be installed (to get geocode info)
Only tested on WordPress 2.0.1 – Works For Me – Your Mileage May Vary – no guarantee, implied or otherwise