jMaps

This example shows you how easily jQuery + jMaps makes changing map types.

In the below example will show how to to easily change the map type using the SetMapType function.

Example 1: Changing Map Types.

Earth | Moon | Mars | Sky
                        
jQuery(document).ready(function(){
	jQuery('#map1').jmap('init', {'mapType':G_PHYSICAL_MAP,'mapCenter':[37.4419, -122.1419], 'mapZoom':1}, function(thisMap, options){
		
		jQuery('.planet').click(function(){
			var mapType = jQuery(this).attr('rel');
			jQuery('#map1').jmap('SetMapType', mapType);
		});
	});
});