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


Comments

One response to “How to center marker with Pronamic Google Maps plugin for WordPress”

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: