I'm trying to open a custom Google map with pretty photo - I've followed the tutorial on the prettyPhoto site, and have it working to a degree.
The problem is that the map only opens after you click the link twice - never the first time - below is the markup, and script that i have used - please could you tell me what I'm doing wrong?
Thank you:
Mark-up & script:
google.load("jquery", "1.4.2");
// functgion to initialize map - takes longtitude and latitude as arguments function initialize(longtitude, latitude) {
// create new gmap var map = new GMap2(document.getElementById('map_canvas')); // set variable for map center var thisMap = new GLatLng(longtitude, latitude); // set center of the map map.setCenter(thisMap, 8 );
map.setZoom(13);
// add zoom control map.addControl(new GLargeMapControl());
// set variable for map marker var point = new GLatLng(longtitude, latitude); // set marker to equal point marker = new GMarker(point); // add marker to map map.addOverlay(marker);