Routes WordPress Plugin
Introduction
The Routes WordPress plugin allows you to add geographical route information to articles and pages in a WordPress blog, map the routes using Google Maps, and create elevation charts. To see it in action, check out Jennifer's List of Bike Trails.
On this page, you can learn about how to install and use the Routes plugin. A quick list of its features:
- Each post or page can have either a route or a single geographical point associated with it. Points in routes can included elevations and tag markers.
- Enter the routes or points via addresses, typing in latitude/longitude, clicking on a map, importing a GPX file, or a combination, on the post/page editing screen.
- Blog viewers see a Google Map of the route or point on the post/page screen, with tagged points marked, as well as overview maps on category/index pages.
- Optionally, create and display elevation charts of your routes.
- Search by exact city, state, country, or for the closest routes to a geographical point.
Read on for details... On this page:
- Installation and Setup
- Theme Modifications
- Entering Geographical Information
- Frequently Asked Questions
Installation and Setup
Requirements for using Routes:
- WordPress version 2.2 or higher
- A Google Maps API key (see below)
- A Google Maps-compatible browser (most are) with JavaScript enabled for yourself and your viewers to see the maps. (Note that some Internet Explorer users may need to change their security settings in order to see maps and map features, and they may need to upgrade to version 7.0 or higher.)
- The PHP GD library installed on your web host, if you want to generate elevation profile images (most commercial hosts do have the GD library -- it is pretty standard).
- The PHP XML Parser library installed on your web host, if you want to import GPX files (again, this is pretty standard).
Note that the Settings page (see below) will tell you if you have things set up correctly for elevation profiles and GPX imports or not.
How to install and set up Routes:
- Download the plugin package (zip file). The file size is 41.9 KB (42,979 bytes). The current version of Routes is 2.2.
- Extract and upload the files: routes.php (the main plugin file) goes into wp-content/plugins, in your WordPress installation.
- Optionally, localize Routes: If you are using a localized version of WordPress and also want the Routes admin/editing panels (and one or two error messages blog viewers could see when using proximity search) to display in a language other than English, you will need to localize Routes. Routes uses the standard WordPress translation mechanism; the MO file(s) you create need to go into the WordPress plugins directory (wp-content/plugins) and be named "routes-LOCALE.mo", where LOCALE is the name of the locale you are using for WordPress (such as "es_ES" for Spanish). A Spanish translation (both PO and MO files) and the POT file for translating into other languages are provided in the Routes zip file.
- Activate the plugin from your WordPress administration panel (log in, click on "Plugins" in the top menu bar, and activate the "Routes" plugin by clicking on the link that says "Activate" to the right of the plugin name). If you are upgrading from a previous version of Routes, deactivate Routes and then activate it again. If you need more detailed information on how to manage WordPress plugins, please visit the Managing Plugins page on the WordPress site.
- Set options: Click on "Options" or "Settings" (depending on which version of WordPress you are using)
and then "Routes" to get to the Routes settings panel. Enter your Google Maps API key.
If you do not have a Google Maps API key, visit
http://www.google.com/apis/maps/signup.html
to get one. You might also want to change some of the other settings (some of the explanations may
be confusing until you read the rest of this web page):
- Language Code: You can enter a 2-letter language code, and if it is supported by Google Maps, the tool tips, map types, and other text on the map will show up in that language. Leave this blank to use English. You can also let Routes use the setting of your WordPress locale, by checking the appropriate box.
- Map Choices: Google Maps has several different types of maps it can show, depending on what part of the world you are mapping. Check the boxes for which choices you want to offer your blog viewers, and choose a Default map type.
- Map Features: Google Maps has several optional features that can be shown on your Google Maps, including Local Search (a search box that lets you search for nearby hotels, schools, etc.), a scale of miles/km, and an overview map. For best results, choose no more than 2 of these 3 features.
- Driving Directions: If you check the box, when a visitor double-clicks on a map, they will be given a choice of getting driving directions to this point or from this point. This will open up Google Maps in another window.
- Use small icons on index maps: Check this box to show small markers on multiple-route maps, such as your blog's home page. If it is not checked, the larger standard Google Maps markers will be used.
- Use special green icon at start of route: Check this box if you want to put a green arrow marker at the start of the route on a single-route map. This is useful if you are displaying elevation profiles, so viewers will know which end of the route is the start. Another option would be to tag the start and end of the route with text tags, but this requires the user to click the tag to see tag information.
- Create elevation profile on save: Check this box if you want Routes to create elevation profile image files whenever you save a post with elevation information, and automatically look up elevations when you enter a route point by clicking on the map (see below for more information). Note that this setting does not affect any posts you have already created -- you will need to edit existing posts and save them to create or re-create elevation charts.
- Use metric units for elevation profiles: Check this box if you want Routes to use metric units (meters) for elevations when you look them up with the Lookup button (see below for more information on that). If it is not checked, Routes will use English units (feet).
- Height/Width of elevation profile: Enter the height and width of the elevation profile images to create. Recommended minimum values are 100 by 100 pixels. Note that this setting does not affect any elevation profile images you have already created -- you will need to edit existing posts and save them to create or re-create elevation charts.
- Background color, line/text color, and fill color of elevation profile: Enter red, green, and blue values (0 to 255) for the background color of the elevation profile images (defaults to white, 255/255/255), the line/text color for the axes (defaults to black, 0/0/0), and the color used to fill the elevation profile chart (defaults to a blue color). There are links at the top of the Routes Settings screen to a couple of web sites where you can look up RGB values for colors. Note that this setting does not affect any elevation profile images you have already created -- you will need to edit existing posts and save them to create or re-create elevation charts.
- If you are planning to generate elevation profiles, make sure the standard uploads directory (wp-content/uploads under your WordPress site directory) exists and is writable. (The elevation profile images will be saved in a sub-directory "routes" underneath that directory, which Routes will create.)
- Add Routes to your theme (see below).
That's it! You're now ready to add geographical information to your posts or pages (see below), and have it displayed in your WordPress site.
Theme Modifications
There are several modifications you will need to make to standard WordPress Themes, in order to use Routes.
Sample Theme
Because the theme modifications are complex for some Routes users, one thing you might want to do is to download a sample theme with the modifications installed in it. You can either use this theme for your web site (possibly modifying the style), or you can use it as a guide for modifying your preferred theme.
The sample theme is a modified version of the Sandbox theme, and is compatible with WordPress 2.2 or higher, and Routes 1.02 or higher. Click here to download the Routes Sandbox Theme (zip file). The file size is 53.9 KB (55,211 bytes). The current version supports the tags in WordPress 2.3 and later versions of WordPress, but still works with WordPress 2.2 as well.
Once you have downloaded the Theme, install and activate just like you would any other WordPress Theme. Then visit the Widgets page in the Presentation section of the WordPress administrations screens, and customize your sidebars (this Theme does not have any of the special Routes sidebar sections in it, by default). Then you can skip to the section on entering geographical information, if you plan to use Sandbox instead of another theme.
If you are using your own theme, the next sections will tell you how to modify it so it will work with Routes.
Modifications Needed for ALL Maps
There are several modifications you will need to do to your theme, in order to display any maps:
- In order for this plugin to work with blog visitors using Internet Explorer (IE),
you will need to make sure that your theme's HTML header has a special
"namespace" (xmlns) included. To do this,
you will need to find the theme file that prints out the HTML header (probably head.php, header.php,
or maybe simply index.php), and change the HTML line to look like this:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
You can read about the reasons for this change on the Google Maps API home page, if you are interested. You may need to update more than one Theme file as well, depending on how your theme is organized. - Routes adds JavaScript functions to your blog using the standard "wp_head" mechanism
of WordPress. So, for Routes to function correctly, your theme needs to use this mechanism
(most do). If your theme is non-standard, make sure it includes
the following line somewhere between the HTML <head> tag and the
</head> tag in every page that will
display a map (usually, like the previous modification, this will
just go in the header.php file):
<?php wp_head(); ?>
- If you are using Routes 1.02 or a later version,
you will need to add the following line to your Theme, at the very end of the HTML
body, after all the DIV tags are closed, but before the </body> tag. These
lines will need to go into each theme file that will be used to display a map,
so it is probably easiest to put them in your footer.php file, if your
theme has one:
<?php if( function_exists('routes_do_map_js')) {
routes_do_map_js();
} ?>
Single Route Maps - Option 1
One main reason for using this plugin is to display a Google Map of a route (or a single location marker) with the posts or pages you have added geographical information to (see below to learn about how to add geographical information to a post or page). Routes only supports having one map on a web page, so you don't want to display the map corresponding to a particular post when you are on an archive page or any page that displays a list of posts (such as the blog's home page). That is, you only want to display a single-route map when the user is viewing a single-post or single-page screen. Here's one way to make this happen, if you always want the maps to be either entirely before or entirely after the text of your posts or pages. (There is another option in the next section, which does not involve modifying your theme.)
- Make sure you have followed the "Modifications Needed for ALL Maps" instructions above.
- Find the Theme file used to display your post or page. Depending on your theme, for single posts, the file is either single.php (if it exists) or index.php (if it doesn't). If you are adding geographical information to WordPress Pages (i.e. static pages) too, you will need to repeat these steps for the Theme file used to display pages (which is either page.php, index.php, or a custom page template file).
- Find the section of the Theme file where the post's (or page's) content
is displayed -- it should say:
<?php the_content(); ?>
Note that in some themes, you may have to navigate to a different PHP file to find the content. For instance, if there is a line in your index.php, single.php, or page.php file saying something like this:<?php require('post.php'); ?>
(or it could be "include" or "include_once" or "require_once" rather than "require"), then you would look in the file post.php to find where the content is printed. - Open the Theme file you found in a plain-text editor.
- Right below the content line, add the following lines to your theme:
<?php
You can replace the 500 and 400 with a different width and height (in pixels) if you want a different-sized map, and you can leave out the text to print above the map by just entering "" with no text inside. You can also put the lines above the content line, if you want your map to appear above the text content of the page.
if ((is_single() || is_page()) &&
function_exists( 'routes_map' )) {
routes_map( get_the_ID(), 500, 400,
"Text to print above map" );
} ?> - Save the Theme file and upload it to your web server.
- If you want maps on your Pages as well as Posts, repeat the steps above with your Theme's pages.php file, or custom page template file, if you have one in your Theme.
Single Route Maps - Option 2
If you are using Routes version 2.1.5 or a later version, you can also get route maps displayed on single-post or single-page web pages using an alternate method, which allows you to put the maps anywhere you would like in your posts and pages. To do this:
- Make sure you have followed the "Modifications Needed for ALL Maps" instructions above.
- In each post or page, if you want a map to appear, put the following
special function line into
the body of your post or page:
[[routes_map( 500, 400, "Text to print above map" )]]
You can replace the 500 and 400 with a different width and height (in pixels) if you want a different-sized map, and you can leave out the text to print above the map by just entering "" with no text inside.
If you use this method for putting maps in your post, there are a couple of things to remember:
- Maps will be omitted when you are on an archive page, or any other page that displays more than one page or post.
- No map will be displayed in any post or page where you forget to put the special function line into the body of the post, even if you have entered geographical information for that post.
- You cannot mix Option 1 and Option 2 for single route maps. Either modify your theme, or use the special function line, but not both.
Aggregate Route Maps
You can also add an aggregate route map to your "archive" pages and your blog's home page. Basically, this makes it so that whenever WordPress is displaying a list of posts, if they have any routes associated with them, they will be shown on an index map. The map will allow them to pan and zoom (just like any Google map), and it has these additional special features:
- Clicking on a marker or line in the map takes you to the corresponding post about that route or point.
- Hovering your mouse over a marker shows you the name of the corresponding post.
Here is how to add aggregate route maps:
- Make sure you have followed the "Modifications Needed for ALL Maps" instructions above.
- Find the Theme file or files used to display the archives you want to add maps to.
Although for some themes that can be a bit complex (you can read about it in this
article about the
WordPress hierarchy of Theme files), for most themes, the logic is
fairly straightforward:
- For category archive pages, WordPress will use category.php, archive.php, or index.php (in that order, the first one it finds that exists in your theme). You can also have custom category pages for particular categories, such as category4.php for the category whose index is 4.
- For date-related archives (monthly, daily, yearly), WordPress uses date.php, archive.php, or index.php (in that order, the first one found).
- For search results, WordPress uses search.php or index.php.
- For your blog's home page, WordPress uses home.php or index.php (assuming you have your home page set to the default behavior of printing a list of posts).
- Open your Theme file in a plain text editor.
- Decide where you would like the map to be. If you want it to be above the list of posts, then you need to find the beginning of the WordPress "Loop", and insert just above it. If you want the map to be below the list of posts, then you need to find the end of the WordPress Loop, and insert just after it. To find the beginning and end of the Loop, read this article about the WordPress Loop. Note when reading the article that even if you are running a later version of WordPress, your Theme may be based on an older version.
- Insert the following lines into your Theme, either before or after the Loop (but NOT
inside the Loop):
<?php
You can replace the 500 and 400 with a different width and height (in pixels) if you want a different-sized map, and you can leave out the text to print above the map by just entering "" with no text inside. Also, if you want to have the map print for only some types of archive files, you might need to use other WordPress Conditional Tags. Note that "||" in the list above is PHP syntax for "OR", so for instance if you only want the map to be printed on search and category pages, you would use the line:
if ((is_archive() || is_search() || is_home()) &&
function_exists( 'routes_map_multiple' )) {
routes_map_multiple( 500, 400,
"Text to print above map" );
} ?>if ((is_category() || is_search()) &&
- Save the Theme file and upload it to your web server.
- Repeat the steps above for the other Theme archive files that you want maps to appear on.
Note: This function only displays on the map the routes attached to the posts that are displayed below/above it on that particular page of results, so if you want more items displayed, you might want to change the option for "Show at most X posts per page" on the "Reading" screen under "Options" or "Settings" in your WordPress admin panel. You can set that option to the value -1 to make it display all posts no matter what.
Elevation Profiles
If you generate elevation profiles, you can add the following lines to your single-post theme file to show the generated elevation profile chart (see the section above on single-route maps for information on how to find the right theme file and where in the file to insert the chart):
<?php if(( is_single() || is_page() ) &&You can replace "Text for above chart" with the text you would like to see above the elevation charts. If there is no chart for the post or page being displayed, neither the text nor any image will be shown.
function_exists( 'routes_elev_profile' )) {
routes_elev_profile( get_the_ID(), "Text for above chart" );
} ?>
If you prefer, you can also use the post editor to put the elevation plots directly into your posts, from the Uploads or Add Media area of the post editing screen, once they have been generated (they are generated every time you save your post or page, if you have the option set to do that -- see below). If you decide to do that, it is best NOT to put the routes_elev_profile lines above into your theme, or you will end up with two elevation profiles on the screen.
Exact Search Form
Routes has the capability of searching by city and/or state/country (if you enter them in your routes). If your Theme includes the default WordPress search form, and a user enters a search term, Routes will automatically search in the cities and states/countries you entered (as well as the post titles and content).
You can also offer your visitors a specific city and/or state/country search. There are three ways to do this:
- Build your own search form, similar to the default search form in your Theme. Add fields with name and ID equal to "routes_city" to search the City field of your routes, and "routes_state" to search the State/Country field of your routes.
- You can also just enter the following in your sidebar (or wherever in your Theme you
would like the search form to appear):
<?php
You can replace "Keyword", "City", "State", and "Search" with the text that you want to use as the labels for the keyword field, city field, state/country field, and search button respectively. And if you would like to leave out one of the fields entirely, just enter "" for that field and it will not be printed.
if( function_exists( 'routes_search_form' )) {
routes_search_form( "Keyword", "City", "State", "Search" );
} ?> - If you are using WordPress 2.2 or higher with the built-in sidebar "Widgets" functionality, you can add the "Routes Search" widget to your sidebar, and configure it.
Proximity Search Form
Besides the exact searching described above, Routes also has the capability of searching for the closest routes to a point. To add a proximity search to your site, there are two methods:
- Put the following lines in your
sidebar (or wherever in your Theme you
would like the proximity search form to appear):
<?php
You can replace "Enter Address", "Lookup", "Latitude", "Longitude", and "Search" with the text that you want to use as the labels for the address lookup field, lookup button, latitude field, longitude field, and search button respectively. The way it works is that the blog viewer can enter an address, city, state, country, and/or postal code in the Address field, and then click the lookup button to look up the latitude and longitude of that point; if Google Maps cannot recognize what they enter, the user will get an error message. Alternatively, they can enter latitude/longitude directly. Then if they click Search, they will see a search results page with the closest trails to that point, in order by distance.
if( function_exists( 'routes_prox_search_form' )) {
routes_prox_search_form( "Enter Address", "Lookup", "Latitude", "Longitude", "Search" );
} ?> - If you are using WordPress 2.2 or higher with the built-in sidebar "Widgets" functionality, you can add the "Routes Proximity Search" widget to your sidebar, and configure it.
State/Country List
Routes also has a function to list the states/countries you have entered into your route points, with each state/country being a link. When a blog viewer clicks the link, they will be shown a list of all the routes that are in that state/country (up to your page limit) -- just as if they used the search by state/country function described above. To add the state/country list to your sidebar (or wherever you want it in your Theme), there are two methods:
- Insert the following lines where you want the state list to appear in your theme:
<?php
As shown, a vertical bar "|" will be put between each state in the list. If you would like to have them on separate lines, use "<br />". If you would like to have them separated by commas, use ", ".
if( function_exists( 'routes_list_states' )) {
routes_list_states( " | " );
} ?> - If you are using WordPress 2.2 or higher with the built-in sidebar "Widgets" functionality, you can add the "Routes State List" widget to your sidebar, and configure it.
Advanced: Conditional Tags
If you are an advanced theme programmer, you might want to know about two "Conditional Tags" that Routes defines:
- routes_is_search() : This is like the standard is_search() conditional tag, but it also detects when the user has searched for a specific city, state, and/or country (or clicked on a state/country from the state list).
- routes_is_prox_search() : This is like the standard is_search() conditional tag, but it detects when the user is using a proximity search.
Entering Geographical Information
Once you have the Routes plugin installed and set up, as described above, you are ready to enter route information for your blog. Route information can be added to both posts and static pages; it works the same for both, so if you want to add information to a page, just follow the directions below and wherever it says "post", substitute "page".
So, first you need to find the Routes data entry section on the post editing screen:
- Find a post that you would like to add route information to in your WordPress "Manage" panel, and click Edit. Or, create a new post from the WordPress "Write" panel.
- Enter a title and content for your post.
- Scroll down and find where it says "Route Waypoints" near the bottom.
- Expand the Route Waypoints section by clicking on the "+" sign on the right of the bar, or arrow on the left side of the bar, if necessary.
Each point in your route has several fields of information you can enter:
- Order (Required): An ordering number for the point -- for instance, number the first point 10, the second 20, and so on. That way if you need to insert another point, you can number it 15 to insert it in between. (You can also use decimal numbers in the Order field, if necessary.)
- Address: Street address of your point -- if you enter the address, city, and state, you can click on the "Lookup" button to use Google Maps to look up the latitude and longitude. Otherwise, Address is not used except for your reference when entering points.
- City: City where your point is located. This can be used both for the lookup function just described, and for searching by city (see above).
- State/Country: State and/or Country where your point is located. This can be used both for the lookup function just described, and for searching by State/Country (see above).
- Latitude and Longitude (Required): Routes are displayed on maps using Latitude and Longitude fields only, so these fields are required. You can use the Lookup button to look up latitude and longitude by address (as described above), enter them directly, or click on the map (see below).
If you click on the "Toggle Extended Info Display" button above the list of points, you will see an additional line of fields for each point:
- Tag: Extra information associated with this point. If you enter something here, blog viewers will see a marker in a single-route map at that point, and if they click on the marker, they will see the information you entered displayed in a Google Maps information window. This information can be plain text or HTML (which you can use for images, links, formatting, etc.).
- Elevation: You can look up the elevation of the entered latitude and longitude by clicking on the Lookup button; elevation lookup comes from the United States Geological Survey web site. You can also enter elevation values directly. Once you have looked up or entered at least two elevation values for a route and save the post containing the route, an elevation profile graph will be generated (if you have set the option telling Routes to generate elevation profiles -- see the options section above).
If you want, you can just type information into the fields to enter your route's points. Here are some data entry tips:
- It's possible to enter just one point for a post or page. In that case, maps will display a marker at that point, rather than a route. If you enter at least two points, single-post maps will show a line connecting all the points in order, and aggregate maps will show a line from the first point directly to the last point, and a clickable marker with the post title.
- After entering some points, if you find you want to insert another point, just enter it in the bottom line and set its Order to an appropriate value. You can use zero, negative numbers, and decimals. Next time you save, the points will be put in order.
- After entering some points, if you find you want to delete a point, just click on the checkbox in the "Delete" column, and next time you save, the point will be deleted.
- If you need more space, click on "Save and Continue Editing" (or just "Save" if you are using WordPress 2.5 or later), and you'll get more blank lines for entering points.
You can also use the map to enter points. To do this:
- Click the "Refresh Map" button to show all the points you have already entered. (If the points are not in order, click "Save and Continue Editing" or "Save" instead to put them in order.)
- Pan and zoom the map until the desired region is shown.
- Click on the map where you want the next point to be. It will be entered in the list and shown on the map. If you have the option set to create elevation maps automatically, and you are using Routes 2.1.5 or later, the elevation of the point where you clicked will also be looked up automatically (just as if you had clicked the elevation lookup button, see above).
- At this point, it is a good idea to go up and edit the Order, City, State/Country, and Tag fields (see above for descriptions). When you enter a new point, it is automatically given the previous line's City and State/Country (if entered), and an Order 10 beyond the previous Order, but you can edit those values. If you want to use City or State/Country searching, you will save yourself some time by entering the values after clicking on the first point, or whenever the City changes, so the rest of the City and State/Country values will be entered for you.
- To remove a point, click on its marker in the map. It will be removed from the map and marked as Deleted in the list above. To undo, uncheck the Delete check box in the list and click "Refresh Map". Note that if you have entered (or imported) a lot of points, some will be skipped rather than shown on the map, because Google Maps with more than about 50 markers do not display well. If you want to delete points that are not shown, use the checkbox as described above.
- Tip: If you enter at least one point using Address lookup (as described above), and then click "Save and Continue Editing", or "Save", the map will be shown pointing to your location rather than the entire world.
- Tip: you will see a marker at each point in the map on the edit screen. If you hover over the marker, you will see the point's order value, followed by its latitude and longitude, as an aid to finding it in the list above.
It is also possible to import a GPS track (latitude, longitude, and elevation information) into a post, if the GPS track is saved as a GPX file. To do that:
- Enter at least a post title on the post editing screen, and click "Save and Continue Editing" or "Save".
- Upload a single GPX file in the Uploads section of the post editing screen (if you need to import several tracks, you can repeat these steps). If you are using WordPress 2.5 or later, uploads are done via the media buttons (use the one that looks like a * and says Add Media when you hover over it, for GPX files), which are located to the right of the post body editor toolbar.
- Check the "import GPX" box in the Routes Waypoints section of the post editing screen, and if necessary, check the box saying that the GPX file has elevations in feet.
- If the GPX file has a lot of points in it, you might want to enter a number to import just every 3 points, every 10 points, etc. in the box below.
- Click the "Save and Continue Editing" or "Save" button on the post editing screen. Your GPX file will be imported and removed; the new points will come after any other points you had already entered on the map or by address lookup.
However you have chosen to enter you points, when you are done entering your points, click "Save" or "Publish", and your points will be saved, along with the other post/page information. If you are generating elevation profiles, they are also regenerated every time you click "Save", "Save and Continue Editing", or "Publish". Important: The WordPress "auto-save" function, which saves your post's title and body periodically, does NOT save your Routes points! You need to click the "Save" or "Save and Continue Editing" button to make sure your points are saved.
Frequently Asked Questions (and answers)
- I am having trouble with Routes in Internet Explorer. What could cause that?
First off, make sure you are using Routes 1.02 or greater, WordPress 2.2 or higher, have upgraded IE to 7.0 or higher, and have followed the installation instructions above. If that doesn't fix the problem, check your browser's security settings, and make sure JavaScript can be executed (for some reason, Microsoft has lumped this in with "Active Content" in some versions, and with "Scripting" in other versions). Finally, it could be that your HTML pages are not valid... for some reason, Internet Explorer is very sensitive to invalid HTML and JavaScript (Google Maps uses JavaScript to display the maps, and Routes uses Google Maps). So if you are seeing maps fine using a browser such as Firefox or Opera, and getting page errors or missing maps in Internet Explorer, check the validity of your WordPress output page using the W3C HTML Validator. If your page is invalid, fix your theme, posts, and pages until they produce valid HTML, and the problem with Routes should go away. - I have set the option to create elevation profiles, but they are not being
created when I save my post. What could cause that?
There are several possibilities that you can look into:- You have to have at least two points in your route with elevations entered in order to create an elevation profile.
- Routes creates its elevation profile images using the PHP "GD Library", so if your web host does not have the GD Library installed (most do!), Routes cannot create the images.
- Routes uses WordPress's file upload mechanism to save its elevation profile images, so if you are logged in as a user that does not have file upload permission, then Routes cannot create any elevation profile images. You can fix this by logging back in as the "admin" user, or any other user that has file upload permissions, going to the post edit screen, and saving the post again.
- Routes tries to save the files it creates in directory wp-content/uploads/routes. It will try to create the "routes" directory if it does not already exist, but if your "uploads" directory does not exist, or if you do not have write permission on it, routes will not be able to create its directory or save files there. You can fix this by creating the "uploads" directory and making sure you have write permission in it.
- Sometimes when I click on the map to add a point in the post
editing screen, I get a route line to the new point, but no marker. Why?
If you have more than about 50 points in your route (maybe because you imported them from a GPX file), Routes will not show markers at every point. This is to avoid having the browser take a very long time to load. You can still delete the new point by clicking the Delete checkbox in the list above. - Maps don't seem to be working at all, or if they are, no markers are
shown on them. Why could that be?
Probably you need to go back and read the instructions above for Theme Modification. You need to carefully follow all the instructions for "ALL maps", and also either the instructions for "Single Route Maps" or "Aggregate Route Maps", or both. There are several modifications that have to be made, and if they are not all done, Routes will not display maps correctly.
For testing purposes, you can also try the Sandbox theme (see the theme section above). If Sandbox is displaying maps and your theme is not, then you have not followed all of the instructions. - I have uploaded a GPX file, but when I check the Import box and click
"Save" or "Save and Continue Editing",
the file stays in the Uploads section and is not imported.
What could cause that?
Go to the Options / Routes or Settings / Routes screen (depending on what version of WordPress you are using). There is a section near the top that says whether or not your web host has the software installed that will allow you to create elevation plots, and to allow you to import GPX files. There should be a message there explaining why it won't work. Contact your web host and see if they can fix it. - After installing and activating the plugin, when I try to use it
I am getting an error that says "Table 'wp_routes_waypoint' does not exist."
(or something similar). Why?
wp_routes_waypoint (possibly with a different prefix other than "wp") is the database table that Routes uses to store its point information. It is normally created when you first activate the plugin. However, if your WordPress installation does not have MySQL database permissions that allow it to create new tables, the table will not get created when you activate the plugin. If that is the case, you will need to update your MySQL database permissions. Contact your web host provider. - I am using Routes in an area where Google Maps doesn't have mapping
data, just satellite images. Is it possible to make Routes start in
Satellite mode?
As of Routes Version 2.2, there are options to define which type of maps to offer on your site, and which one to use by default. See the options section, above. - What versions of WordPress is this plugin compatible with?
Routes works with version 2.2 and above of WordPress. The latest version of WordPress that has been tested with this plugin is 2.5. - What has changed from version to version of Routes?
- Version 2.2 - New options for Local Search, map scale, overview map, map types, language, and driving directions. Make lines clickable on index maps. Bug fix: sometimes the post edit screen was showing too many markers and loading slowly.
- Version 2.1.7 (limited release) - Fix minor internationalization bug. Fix for comma vs. period decimal points in numbers.
- Version 2.1.6 - Updates for WordPress 2.5 (still works with earlier versions of WordPress)
- Version 2.1.5 - Avoid loading Routes functions on most admin pages, for faster loading when Routes is not needed. Fix HTML error in Routes search forms. Add ability to automatically look up elevations when using map to input points. Add ability to place route maps in middle of body of post/page.
- Version 2.1.4 - Added support for PHP 5 DOM library, which will allow PHP 5 users to import GPX files. PHP 4 is also still supported (if the XML DOM extension is installed, as before).
- Version 2.1.3 - New feature: GPX import with reduced points. Bug fix: Routes searches now compatible with version 4.2 and above of MySQL (as is the rest of WordPress; previously Routes was using a MySQL 5.x feature in searches).
- Version 2.1.2 - limited/internal release
- Version 2.1.1 - Bug fixes: GPX import was always converting elevations to feet, state/country list was listing blank states. Also changed Post editing screen so that only about 50 markers are shown on the map -- when showing more the screen took forever to load, or failed to load. And a few terms were missing from the internationalization files.
- Version 2.1 - Add ability to import GPX files, "Delete All" button for points, and sidebar Widgets for WordPress 2.2 and above.
- Version 2.0 - Add elevation profile charts, proximity search, and point tagging. Add ability to display aggregate maps with smaller markers. Markers on edit screen now show information to help locate them in the table above.
- Version 1.02 - Fix Internet Explorer bugs. Note that if you are upgrading, some theme and core WordPress modifications are required, see instructions above.
- Version 1.01 - Fix bug: strange characters appearing in marker hover text on aggregate maps. Minor improvements to admin editing interface. Remove markers at ends of single-route maps (now only prints a marker if it's a single-point "route", and prints a route line otherwise).
- Version 1.0 - Initial Release.
- How can I find out if there is a new version of the
plugin?
Subscribe to the RSS feed on the sidebar of this page, or check back on this page regularly to see if there is a new version. Note: The mechanism in WordPress 2.3 and above for automatic checking of version updates does NOT work with this plugin! It only works for plugins that are hosted on a particular WordPress plugin site, and this plugin is not hosted there. Sorry!
Questions, Comments, and Bugs
The Routes plugin is provided free, with no warrantee and no guarantee of service or support. However, Poplar ProductivityWare welcomes your comments. So if you have questions about how to install or use the plugin, suggestions for how to make it better, or wish to report a bug in the plugin, please contact Poplar ProductivityWare. Please read and follow the instructions above carefully before contacting Poplar ProductivityWare with questions. Especially with Internet Explorer, all of the theme modifications need to be done exactly as specified for Routes to work. Thanks!
Poplar ProductivityWare: your Seattle-area source for web databases, web programming, Palm OS applications, and analytical/modeling software
Home | Web Programming | Custom Software | Articles | Downloads | Testimonials | Values | Contact UsPoplar ProductivityWare® is a trademark registered in the U.S. Patent and Trademark Office
Copyright (C) 2003-2008 Poplar ProductivityWare LLC