Wednesday, September 30, 2009

[jQuery] Google map throwing exception

Hi All,
 
I am trying google map with JQuery Model window.
 
I have written some script to view google map with model window. Bellow steps are
 
1 - Click on link, (onclick event I am calling a javascript function to show google map with model window)
 
function showGoogleMap(id,lat,long){
   try{
    map = new GMap2(document.getElementById("map"));
    var point = new GLatLng(lat, long);  //default loaction to india
    map.setCenter(point, 8);
    map.addControl(new GMapTypeControl(1));
    //map.addControl(new GLargeMapControl());
    map.addControl(new GScaleControl(200));
    
    var marker = new GMarker(point);
    
    map.addOverlay(marker);
    map.setCenter(point, 4);
    //marker.openInfoWindowHtml(address);
   }catch(e){
    alert('Exception '+e);
   }   
   $("#googleMap").modal();
}
 
2 - After occuring above function its giving exception
a is null
function zh(a){for(var b;b=a.firstChild;){yh(b);a.removeChild(b)}}
 
Any body have any Idea for this issue...
 
Plz help

 

       Regard
Mohammad.Tareque

No comments: