I think this is a silly question, but I can't seem to find the "right" keyword to use in searching the forums. Anyway
I'm using the google maps API on my website regarding restaurants. The map loads when a restaurant has been selected. I was initially using the google embed map but some errors are happening like markers not showing, etc so I switched to gm API.
Question is, how do I use a drupal.setting variable to a javascript? Here's my code
var myCenter=new google.maps.LatLng(Drupal.settings.eatery_geo.address);
function initialize()
{
var mapProp = {
center:myCenter,
zoom:16,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("map-canvas"),mapProp);
var marker=new google.maps.Marker({
position:myCenter,
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
Where Drupal.settings.eatery_geo.address has the variable?
This seems to not work, only showing a blank div.