jMaki Mapit Sample for Java

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 jmaki-mapit.war file to the autodeploy directory of your 
web container or use the deployment tools that came with your web container
to deploy the war. The war requires J2EE 1.4 or better.

Now access the application at:

http://localhost:8080/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

<a:ajax  name="yahoo.map" 
                             args="{
                             centerLat:37.39316, 
                             centerLon:-121.947333700
                             }" />

with:

<a:ajax  name="google.map" 
                             args="{
                             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

III. Feedback - Issues

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

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