The final part in making it all work is setting up a bit of HTML to call your map. In the samples directory is a provided PHP script that will do this for you, the important code is:
require_once("gmap.inc.php");
if (isSet($_GET['view'])) {
print(getGMapEZ("map.cfg", $_GET['view']));
} else {
print(getGMapEZ("map.cfg"));
}
This will allow you to call the PHP file with a view parameter that matches the names or you configured in your extends section in the configuration. Sample URL's from my own installation:
Your HTML document that hosts the map must use <html xmlns:v="urn:schemas-microsoft-com:vml"> to prevent errors in Internet Explorer.
View the default extend map |
|
View the sengland extend |
You could use mod_rewrite in Apache to make these URL's look nicer. A simple rule like the one below can redirect all requests to /yourmap/view/extendname to view the specific extend.
RewriteRule view/(.+) index.php?view=$1
Using this mod_rewrite rule you can view my South England map with the following url http://www.devco.net/visited/view/sengland
