The Geo plugin allows you to attach geographic coordinate information to posts. It also lets you specify a default geographic location for your entire WordPress blog.
If you upgraded your WordPress 1.2 installation to a WordPress 2.0 installation, you’ll be happy to know that the Geo plugin will upgrade your location data so that your old data is preserved.
This readme.txt document is a basic introduction to using the Geo plugin. Please refer to the documentation at the WordPress plugin repository for the latest information:
The Geo plugin provides some configuration options for posting location information on your blog. Find these options in the Administration Panel under Options | Geo Info.
Geographic Tracking Features
Checking this option enables geographic location features on your blog. This must be checked if you want WordPress to automatically include geo information.
When no location is specified
This option tells Geo what to do when you provide no coordinates for a post. You can either output no information or output a default setting, as specified in the Latitude and Longitude boxes that follow this option. This setting is also used for pages that display more than one post, for eaxmple, the blog home page.
Geo will keep a list of locations that you specify so that you can select one using a dropdown on the post editing page rather than remembering coordinates for specific places.
To add a new location to the table, specify the name, latitude, and longitude in the New Location row, then click the Add/Update Locations button. Your new location will appear in the table and will be available immediately from the dropdown on the post editing page.
Change a location’s coordinates by editing them directly in the table, then clicking the Add/Update Locations button.
Delete a location entirely by clicking the Delete link. You will need to confirm this selection before it is committed.
Attaching Coordinates to Posts
The form fields to attach coordinate information to posts only appear on the Advanced Editing page. This page appears when editing a previously written post or by clicking the Advanced button on the standard post-writing page.
The available fields allow you to directly specify a Latitude and Longitude for the post. You may also choose an option from the Preset Locations dropdown to set the Latitude and Longitude boxes to their appropriate values.
Displaying Geo Information
When the plugin is enabled and Geographic Tracking is turned on, the Geo plugin will automatically add approriate meta tags to the head section of your blog containing the geographic information.
You may wish to use the coordinate information in your blog directly for other means (displaying a map, for example). A variety of coordinate-specific functions become available when the plugin is installed.
These functions are only valid in the context of “The Loop”. Outside “The Loop” the longitude and latitude values of a post are unavailable.
Returns the Latitude value associated with a post.
Returns the Longitude value associated with a post.
Outputs the Latitude value associated with a post.
Outputs the Longitude value associated with a post.
Creates a dropdown containsing a list of sites that are coordinate-sensitive. Choose an item from the dropdown to visit that site with the latitude and longitude values specified for the post.
Returns true if the Longitude for the post is outside of the acceptible range.
Returns a URL to the specified mapping site for the current coordinates. Use one of these strings for $index: AcmeMap, GeoURL, GeoCache, MapQuest, SideBit, DegreeConfluence, TopoZone, FindU, MapTech, GoogleMaps
Outputs a URL to the Acme Mapper for the post coordinates.
Outputs a URL to GeoURL for the post coordinates.
Outputs a URL to GeoCache for the post coordinates.
Outputs a URL to MapQuest for the post coordinates.
Outputs a URL to SideBit for the post coordinates.
Outputs a URL to Degree Confluence for the post coordinates.
Outputs a URL to TopoZone for the post coordinates.
Outputs a URL to FindU for the post coordinates.
Outputs a URL to MapTech for the post coordinates.
geo_distance($lat1, $lon1, $lat2, $lon2, $unit=’m’)
Outputs the number of miles, kilometers, or nautical miles from lat1/lon1 to lat2/lon2. Use with get_Lat()/get_Lon() to determine the distance from the current post to a set point.
Installing the Geo plugin is simple:
- Download the latest Geo archive.
- Extract the files from the archive.
- Upload the geo.php file to your wp-content/plugins directory.
- In the WordPress Admin Panel, activate the Geo plugin on the Plugins tab.
- Visit the Options | Geo Info tab to configure the plugin.