Please look at the code and tell me what's wrong...the map does not
show up, (only the 'Powered by Google' and 'Terms of Use') is visible,
while the rest is greyed...
<div align="center" id="map" style="width:600px; height:400px"></div>
<script type="text/javascript">
//<![CDATA[
var currentmarker;
var map = new GMap(document.getElementById("map"));
this.map.setCenter(new GLatLng(19.0780174,73.0001163), 5,
G_MAP_TYPE);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GOverviewMapControl());
// bind a search control to the map, suppress result list
map.addControl(new google.maps.LocalSearch(), new
GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(160,20)));
var point;
var count = 0;
GEvent.addListener(map, 'click', function(overlay, point) {
//map.recenterOrPanToLatLng(point);
if (count>0) {
if(currentmarker) {
document.getElementById("latbox").value="";
document.getElementById("lonbox").value="";
}
map.removeOverlay(currentmarker);
count = count - 1;
}
currentmarker = new GMarker(point, {draggable:true});
count = 1;
map.addOverlay(currentmarker);
});
//GSearch.setOnLoadCallback(initialize);
// Recenter Map and add Coords by clicking the map
GEvent.addListener(map, 'click', function(overlay, point) {
document.getElementById("latbox").value=point.y;
document.getElementById("lonbox").value=point.x;
});
//]]>
</script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---