jMaki Mapit Sample for PHP

This samples uses the Yahoo Geocoder and Yahoo map together.  The Yahoo 
Geocoder is used to find the latitude and longitude of a location.  Those
coordinates are passed via the Glue code (resources/glue.js) to the map 
service and displayed as a map. 

This application uses one of the provided layouts. Feel free to change it
to look how you like.

I. Deploying

Copy the contents 'web' directory to the root of your PHP 5.1 or better
PHP server.

You should be able to access the application from:

http://localhost/jmaki-mapit

II. Changing the Yahoo Map to a Google Map

You may want to use Google to plot the map. 

Change the code in the index.jsp file to use Google maps by replacing

<?php
addWidget('yahoo.map', null,
   "{centerLat:37.39316, centerLon:-121.947333700}");
?>

with:

<?php
addWidget('google.map', null,
   "{centerLat:37.39316, centerLon:-121.947333700}");
?>


III. Changing the Web Application Name or Port

If you deploy to a port and context other than the default
http://localhost:8080/jmaki-mapit/ or http://localhost/jmaki-mapit/ you
will need to get a key to display the Google map.  Go to  
http://www.google.com/apis/maps and follow the instructions to get a key. Next, cut the and paste that key matching the URL your web application is
deployed at in the resources config.json file as shown here just after the 
last entry for the existing keys.

                    {"url" : "http://localhost:8080/YOUR_WEB_ROOT/",
                     "key" :"<cut and paste the key here>" 
                    }

Now save the index.jsp file and reload the page.  You should see the google
map used instead of Yahoo.

II. Resources

Find out more about Glue at:

https://ajax.dev.java.net/glue.html

Find out more about configuring Glue Code at:

https://ajax.dev.java.net/widget-developer.html#config

Please see the jMaki Forums for issues or to give feedback.

http://forums.java.net/jive/forum.jspa?forumID=96