Lesen Sie die Gruppe Leitlinien: http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines Dann Post einen Link zu Ihrer Seite, nicht Code.
On Nov 4, 1:05 pm, pi5701 <[EMAIL PROTECTED]> wrote: > ich komm hier nicht ganz weiter > > möchte mit removeoverlay() meine marker entfernen da mit clearoverlays > auch die glayer wiki und pano resetted werden > > da ich nicht viel ahnung von javascript hab is der code > zusammengewürfelt und ich weiss nicht wie ich nun alle marker > entfernen kann, mit removoverlay(marker)entfernt er immer nur den > zuletzt gesetzten marker > > hier der hoffentlich relevante teil meines scripts > > <script type="text/javascript"> > //<![CDATA[ > > if (GBrowserIsCompatible()) { > var map; > var geo; > var reasons=[]; > var ovMap=new GOverviewMapControl(); > var mini=ovMap.getOverviewMap(); > var icon; > > var icon2; > icon2 = new GIcon(); > icon2.image = "map/bilder/marker2.png"; > icon2.shadow = "map/bilder/marker2_shadow.png"; > icon2.iconSize = new GSize(32, 32); > icon2.shadowSize = new GSize(59, 32); > icon2.iconAnchor = new GPoint(9, 33); > icon2.infoWindowAnchor = new GPoint(20, 1); > > function load() { > map = new GMap(document.getElementById("map")); > map.addControl(new GLargeMapControl()); > map.addControl(new GMapTypeControl()); > map.setCenter(new GLatLng(20,0),2); > map.addMapType(G_PHYSICAL_MAP); > map.enableContinuousZoom(); > map.enableScrollWheelZoom(); > var scalePos = new GControlPosition(G_ANCHOR_TOP_LEFT, new > GSize(75,10)); > map.addControl(new GScaleControl(),scalePos); > var overV=new GOverviewMapControl(new GSize(200, 150)) > map.addControl(overV); > > // ====== Create a Client Geocoder ====== > geo = new GClientGeocoder(); > icon = new GIcon(); > icon.image = "map/bilder/marker.png"; > icon.shadow = "map/bilder/marker_shadow.png"; > icon.iconSize = new GSize(12, 20); > icon.shadowSize = new GSize(22, 20); > icon.iconAnchor = new GPoint(6, 20); > //icon.infoWindowAnchor = new GPoint(5, 1); > > // ====== Plot a marker after positive reponse to "did you mean" > ====== > function place(lat,lng) { > var point = new GLatLng(lat,lng); > map.setCenter(point,7); > marker = new GMarker(point, {icon:icon, clickable:false}); > map.addOverlay(marker); > > } > > // ====== Geocoding ====== > function showAddress() { > var search = document.getElementById("search").value; > // ====== Perform the Geocoding ====== > geo.getLocations(search, function (result) > { > map.clearOverlays(); > if (result.Status.code == G_GEO_SUCCESS) { > // ===== If there was more than one result, "ask did you mean" on them > all ===== > if (result.Placemark.length > 1) { > document.getElementById("message").innerHTML = "<b>Suchergebnisse</ > b>"; > // Loop through the results > for (var i=0; i<result.Placemark.length; i++) { > var p = result.Placemark[i].Point.coordinates; > var tmp = " "+p[0]; > point1 = tmp.replace(".",","); > tmp = " "+p[1]; > point2 = tmp.replace(".",","); > > document.getElementById("message").innerHTML += > "<br> "+(i+1)+": <a href='javascript:place(" +p[1]+","+p[0]+")' > onfocus='this.blur()'>"+result.Placemark[i].address+"</a> > [<span style=cursor:text><small>"+point2 +" "+point1+"</ > small></span> ]"; > > } > } > > // ===== If there was a single marker ===== > else { > document.getElementById("message").innerHTML = "<b>Suchergebnisse</ > b>"; > for (var i=0; i<result.Placemark.length; i++) { > var p = result.Placemark[0].Point.coordinates; > var tmp = " "+p[0]; > point1 = tmp.replace(".",","); > tmp = " "+p[1]; > point2 = tmp.replace(".",","); > document.getElementById("message").innerHTML += > "<br> 1: <a href='javascript:place(" +p[1]+","+p[0]+")' > onfocus='this.blur()'>"+result.Placemark[0].address+"</a> > [<span style=cursor:text><small>"+point2 +" "+point1+"</ > small></span> ]"; > > } > } > } > > //]]> > </script> > > <script type="text/javascript"> > var pano = new GLayer("lmc:panoramio/1"); > var wiki = new GLayer("org.wikipedia.de"); > > function switchLayer(checked,layer){ > if(checked)map.addOverlay(layer); > if(!checked)map.removeOverlay(layer);} > > </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 Google-Maps-API@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---