I've read a few threads here and I understand there's a scope issue with my globalSettings properties not being available in the google.maps.event.addDomListener function.
The console.log statement returns undefined, but if I do console.log(globalSettings), it shows the object and its properties.
How do I make the properties available so I can use them to initialize the map center and zoom?
var globalSettings = jQuery.parseJSON(wpmm_settings);
var ICON = new google.maps.MarkerImage('medicare.png', null, null,
new google.maps.Point(14, 13));
var SHADOW = new google.maps.MarkerImage('medicare-shadow.png', null, null,
new google.maps.Point(14, 13));
google.maps.event.addDomListener(window, 'load', function(globalSettings) {
console.log(globalSettings.map_center_lat);
var map = new google.maps.Map(document.getElementById('map-canvas'), {
center: new google.maps.LatLng(globalSettings.map_center_lat, 135),
zoom: 4,
mapTypeId: google.maps.MapTypeId.ROADMAP
});...
wpmm_settingswas and exactly whatglobalSettingscontained.