Routes WordPress Plugin
This is the third page describing the Routes plugin for WordPress. If you didn't start on the first page, you might want to go back and start there.
Once you have the Routes plugin installed and set up, as described on the other pages about Routes, 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, or create a new post and enter a title and body.
- 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.
- At the top of this section, you can define which icons and line type you want to use for this particular post (to override the defaults).
- Expand or hide groups of data entry lines, as necessary, by clicking on the "Show/hide rows 1 to ..." links.
There are two types of points you can enter: "route points" and "points of interest" (POI). If you want to have a map, you need to enter at least one route point.
Each route point 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 theme page).
- 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 theme page).
- 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 "Show/Hide Extended Info" button above the list of route points, you will see an additional line of fields for each route 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.). Also, if you have checked the box on the Routes settings screen to create elevation profiles, and the box that says to put markers on the elevation profiles, you will also get a marker on the elevation profile corresponding to the marker on the map.
- Elevation: You can look up the elevation of the entered latitude and longitude by clicking on the Lookup button; elevation lookup comes from Google Maps. 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 on the installation page). If you forgot to enter elevations, or you imported a GPX file (see below) whose elevations are faulty or missing, you can look up elevations in bulk by using the "Look up 100 elevations" button. It looks up elevations in batches of 100 rows of information, so if you have more than 100 points in your route, you will need to click the button multiple times to update all the elevations.
There are several ways to get information into these fields:
- Type information into the fields
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 "Add More Input Lines".
- 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 have more than about 50 points, you will only see markers for some of your points, because Google Maps gets really slow with a lot of markers displayed. 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.
- Import a GPS track (latitude, longitude, and elevation information)
into a post, if the GPS track is saved as a GPX file. (Note that only GPS tracks in GPX format are supported. GPX "routes" and "waypoints" are not supported, only "tracks", which is what most GPS devices create.)
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. You might also check out the GPSBabel software, and use its "simplify" filter to reduce the points in your GPX file before uploading.
- Click the "Save and Continue Editing", "Save", or "Save Draft" button on the post editing screen (depending on your WordPress version). 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 your 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.
Points of Interest
As of Routes 2.3.0, you can also have Points of Interest (POI) displayed on your per-post maps. These are points that are separate from the main route, and are displayed with custom icons (which you can set up on the Routes Icons settings page).
POI have several fields of information you can enter:
- Address: Street address and/or city, state, and country of your point -- if you enter this, 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.
- Latitude and Longitude (Required): POI 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. This works the same as when entering Route points (see above) -- just make sure the option button is set so that when you click on the map, you get a POI instead of a Route point.
- Text: If you enter something here, blog viewers can click on the marker, and 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.).
- Icon: Choose the icon you want to display this POI with, from the drop-down list. You can create custom icons for your site on the Routes Icons settings page.