- Code: Select all
<?php $coordinates = GeoMashup::post_coordinates(); if ($coordinates) { echo '<span class="routebuddy"><a href="rbud://view?&lat=' . $coordinates['lat'] . '&lon=' . $coordinates['lng'] . '&zoom=4">Create</a> a waypoint in RouteBuddy</span>'; } ?>
You can try it out here (see Actions in the post footer):
http://www.bioneural.net/2008/06/15/lathkill-dale-in-the-peak-district/
Now a question:
As far as I can tell rbud:// URLs have only three parameters (lat, lon, and zoom). The waypoint editor has fields for Name, Notes, and Link. It would be very cool if these were also supported, then in WordPress you could populate these fields as follows:
- Code: Select all
&name=<?php _e(urlencode(the_title_attribute('echo=0'))); ?>
&notes=<?php the_excerpt(); ?>
&link=<?php the_permalink(); ?>