sorry its not online at the moment.
i give you the complete function:

function showGoogleMap(ajaxTarget, aId) {
        var m = $('#map')[0];
        if (window.GBrowserIsCompatible()) {
                $(m).empty();
                var map = new GMap2(m);
                var coord;
                var centerx = 0.0;
                var centery = 0.0;
                var divider = 0;
                var marker = new Array();
        //      var myMarker = new Array();
                var i;
                var item;
                for (i = 0; i < googleMapCoords.length; i++) {
                        item = googleMapCoords[i];
                        coord = item['coord'].split(',');
                        var point = new GLatLng(coord[0],coord[1]);
                        if(point) {
                                centerx += parseFloat(coord[0]);
                                centery += parseFloat(coord[1]);
                                marker[divider] = new GMarker(point);
                                marker[divider].content = new Object();
                                marker[divider].content['address'] = 
item['address'];

                                GEvent.addListener(marker[divider], 
'mouseover', function() {
                                        
this.openInfoWindowHtml(this.content['address']);
                                });
                                GEvent.addListener(marker[divider], 'mouseout', 
function() {
                                        this.closeInfoWindow();
                                });
                                /*
                                myMarker[divider] = marker[divider];
                                if(item['elemId']) {
                                        GEvent.addDomListener( 
document.getElementById(item['elemId']),
'mouseover', function() {
                                                
GEvent.trigger(myMarker[divider], 'mouseover');
                                        });
                                        GEvent.addDomListener( 
document.getElementById(item['elemId']),
'mouseout', function() {
                                                
GEvent.trigger(myMarker[divider], 'mouseout');
                                        });
                                }*/
                                if(item['link']) {
                                        marker[divider].content['link'] = 
item['link'];
                                        GEvent.addListener(marker[divider], 
'click', function() {
                                                if(ajaxTarget != '' && aId != 
''){
                                                        ajaxLoad( baseUrl + 
this.content['link'],
'ajax=1&ajaxTarget='+ajaxTarget+'&aID='+aId, $(m), true, '');//
+'&saveContainer=1'
                                                } else {
                                                        location = baseUrl + 
this.content['link'];
                                                }
                                        });
                                }
                                map.addOverlay(marker[divider] );
                                divider ++;
                        }
                }
                centerx = centerx / parseFloat(divider);
                centery = centery / parseFloat(divider);

                var center = new GLatLng(centerx, centery);
                map.setCenter(center,5);
                map.addControl(new GSmallMapControl());
        }
}

the commented lines cause the error. googleMapCoords is a global array
with lat long data and the inline code for InfoWindowHtml.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to