WordPress to RouteBuddy

RouteBuddy users can use 'Extras' as a place to offer code or advice.

WordPress to RouteBuddy

Postby bmckenzie » Sun Jul 13, 2008 5:02 pm

WordPress users can choose from several plugins to geotag their posts. I use GeoMashup, which plots articles using the Google Maps API. FYI here is a code snippet I just put together to use this plugin to create a waypoint in RouteBuddy:

Code: Select all
<?php $coordinates = GeoMashup::post_coordinates(); if ($coordinates) { echo '<span class="routebuddy"><a href="rbud://view?&amp;lat=' . $coordinates['lat'] . '&amp;lon=' . $coordinates['lng'] . '&amp;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
&amp;name=<?php _e(urlencode(the_title_attribute('echo=0'))); ?>
&amp;notes=<?php the_excerpt(); ?>
&amp;link=<?php the_permalink(); ?>
User avatar
bmckenzie
 
Posts: 5
Joined: Sun Jul 13, 2008 2:00 pm

Return to RouteBuddy Extras

Who is online

Users browsing this forum: No registered users and 1 guest