How to center marker with Pronamic Google Maps plugin for WordPress

We have World map viewed as default map when Google Maps loaded in the website, now we want to make marker centered on the map.  Put the following JavaScript code snippet below Google Maps mashup code 

jQuery(document).ready(function($) {
	// Mashup
	jQuery(".pgmm").bind("pronamic-google-maps-ready", function(event, map){
		map.setCenter(new google.maps.LatLng(latitude, longitude));
	});
});

Change latitude and logitude to your location

  • sicktech

    Thanks for the code! Looks like you forgot a extra parentheses after longitude should be:

    map.setCenter(new google.maps.LatLng(latitude, longitude));