hong007, thanks for the clarification! That did the trick!
For anyone else who wants to draw a polygon based on their current
zoom level's viewport, here's the code:
var bounds:LatLngBounds = map.getLatLngBounds(); //new LatLngBounds();
var northEast:LatLng = bounds.getNorthEast();
var northWest:LatLng = bounds.getNorthWest();
var southEast:LatLng = bounds.getSouthEast();
var southWest:LatLng = bounds.getSouthWest();
var polygon:Polygon = new Polygon([
northWest,
northEast,
southEast,
southWest,
northWest], new PolygonOptions({
fillStyle: {
color: 0xff0080,
alpha: 0
},
strokeStyle: {
thickness: 3,
color: 0xFF0000,
alpha: 1,
pixelHinting: true
}})
);
this.map.clearOverlays();
this.map.addOverlay(polygon);
--
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" 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-for-flash?hl=en.