jMaps is a jQuery plugin that provides a really easy API to create and manage multiple google maps on any page.
- Geocode and reverse any valid address in the world via Google's geocoding API
- Search for directions to and from any location
- Add and remove Markers
- Add and remove polygons and polylines
- Add and remove graphic layers on the map
- Add and remove Google adsense layers
- Add and remove Traffic layers
- Get information back such as map center, map size, map type, etc
News:
- Important Information On The Upcoming Release - Some vital changes are happening in jMaps that WILL break your current maps, please read.
- jMaps r72 released - see Versions for more information.
Also now tracking #jmaps on http://twitter.com/tanepiper
The full API Documentation and examples are available at http://map.ifies.org
Here is an example of how to use jMaps to create an address search facility:
jQuery(document).ready(function(){
jQuery('#map1').jmap('init', {'mapType':'hybrid','mapCenter':[37.4419, -122.1419]});
jQuery('#address-submit-1').click(function(){
jQuery('#map1').jmap('SearchAddress', {
'query': jQuery('#address').val(),
'returnType': 'getLocations'
}, function(result, options) {
var valid = Mapifies.SearchCode(result.Status.code);
if (valid.success) {
jQuery.each(result.Placemark, function(i, point){
jQuery('#map1').jmap('AddMarker',{
'pointLatLng':[point.Point.coordinates[1], point.Point.coordinates[0]],
'pointHTML':point.address
});
});
} else {
jQuery('#address').val(valid.message);
}
});
return false;
});
});