Ich habe folgendes Problem: Ich zeichne ein GPolygon als Overlay auf
die Karte, jedoch ist das Polygon beim aktuellen (und einem Zoom
größer) nicht sichtbar, bei allen anderen Zoomleveln ist es aber
sichtbar.

Das GPolygon meldet auf die Anfrage isHidden() auch wie erwartet mit
false.

Hier mein Beispiel, wobei "response" aus einem Array mit Objekten mit
lat/lon besteht. Daten liegen als JSON in folgender Form vor:
response = [{"lon":"-56.4235382080078","lat":"23.9958057403564"},
{"lon":"-56.1248817443848","lat":"23.9128608703613"},...,
{"lon":"-56.4235382080078","lat":"23.9958057403564"}]

Die Karte wurde ganz normal initialisiert:

  function load()
  {
    if (GBrowserIsCompatible())
    {
      map = new GMap2(document.getElementById("map"));
      map.addControl(new GSmallMapControl());
      map.setCenter(new GLatLng(52.561, 13.409524), 11);
      map.enableScrollWheelZoom();
      map.setMapType(G_PHYSICAL_MAP);
    }
  }

Das Polygon wird so erstellt (und es scheint ja richtig zu sein, da es
auch mal sichtbar ist und korrekt dargestellt wird):

        try
        {
          points = [];

          for (pos in response)
          {
            points.push(new GLatLng(response[pos].lat, response
[pos].lon));
          }

          var overlay = new GPolygon(points, '#f33f00', 3, 0.8,
'#ff0000', 0.2);
          overlayTemp[lastOverlay.getId()] = overlay;
          map.addOverlay(overlayTemp[lastOverlay.getId()]);

          alert("is hidden: " + overlay.isHidden());
        }
        catch (e) { }

Das Problem besteht in Firefox und IE, ich kann mir aber keinen Reim
drauf machen.

--~--~---------~--~----~------------~-------~--~----~
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