Well, i`m sorry but i dont have the possibility to link my code now.
So i have to post some code again.

When i define gmarkers and mgr global, no marker is shown on the map,
error: map2 is not defined.
When i define both in a function, for example in createpoints, no
error is produced but also no marker shown :)


 var mgr = new MarkerManager(map2);

                var markerlist = [];

                function createPoints(data) {

                                                        for (var i = 0; 
data.length; i++) {
                                                        var point = new 
GLatLng(data[i].latitude, data[i].longitude);
                                                        map2.setCenter(point);
                                                        map2.setZoom(16);
                                                        
map2.addOverlay(createMarkerWithIdentifier(point, data[i].id,
data[i].beschreibung));

                                                }
                                                mgr.addMarkers(markerlist);
                                                mgr.refresh;
                                        }


                                        function 
createMarkerWithIdentifier(point, id, beschreibung) {

                              var nummer = id;
                      var idIcon = new GIcon(baseIcon);
                      idIcon.image = "http://www.schlumsch.eu/e2e/
gmapicons/marker" + id + ".png";
                      markerOptions = { icon:idIcon };
                                          var marker = new GMarker(point, 
markerOptions);
                                          GEvent.addListener(marker, "click", 
function() {
                                            
marker.openInfoWindowHtml(beschreibung);
                                          });
                                          GEvent.addListener(marker, 
"dblclick", function()
{ mgr.removeMarker(marker); } );
                                                markerlist.push(marker);

                                          return marker;
                                        }
--~--~---------~--~----~------------~-------~--~----~
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