|
Cookbook /
GeoboxSummary: Create links to various map sites from provided gps coordinates.
Version: 2011-10-05
Prerequisites:
Status:
Maintainer: Anomen
Categories: Links
Discussion: Geobox-Talk?
Questions answered by this recipeHow to automatically create links for given gps coordinates to various map sites. DescriptionRecipe creates links to various map sites from provided gps coordinates. InstallationDownload geobox.phpΔ. In config.php, add the following line:
include_once("$FarmD/cookbook/geobox.php");
UsageUse geobox markup
to create link list: 49°43.996' 014°27.665 mapy.cz gmaps geocaching.com/maps geocaching.com/near Coordinate input format
Coordinate display formatYou can change format of displayed coordinates by using format paremater. Possible values and meanings are:
For example, following line will produce coordinates displayed as degrees:
Point projectionYou can perform point projection using parameters azimuth (value in degrees) and distance (value in meters). Result of projection will be displayed (together with proper links) instead of original given coordinates. For example, following line will produce coordinates
ConfigurationMap sitesYou can modify list of links be changing
In link address you can use these variables (prefixed by
Note: Either apostrophes must be used as string delimiters instead of double quotes or proper $ escaping must be used to avoid expanding of variables by PHP.
Example
include_once("$FarmD/cookbook/geobox.php");
$GeoBoxLinks = array('maps.google.com'=>'http://maps.google.com/?q=$N%20$E');
include_once("$FarmD/cookbook/geobox.php");
SDVA($GeoBoxLinks, array('mapquest'=>'http://www.mapquest.com/?q=$N,$E&zoom=15'));
Change log / Release notes
See alsoLinks
Contributors
CommentsSee discussion at Geobox-Talk?. User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |