The Point in Polygon demo makes use a function called
pointInPolygon().
The easiest way to track what markers are in the polygon is to create
an array to track these markers and test them when they are added to
the map (when the mouse is clicked).
map.addEventListener(MapMouseEvent.CLICK,
function(e:MapMouseEvent):void {
var marker:Marker = new Marker(e.latLng);
map.addOverlay(marker);
aMarkers.push(e.latLng);
if (pointInPolygon(e.latLng, polygon)) {
aMarkersInPolygon.push(e.latLng);
}
});
On Oct 6, 8:57 am, Megharaja <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have placed markers on the map.Lets say i have 20 markers on the
> map.
>
> I want to select the markers based on my polygon area.
>
> Here is the example of polygon
>
> http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/PolyDrawerD...
>
> If some 5 markers available within that polygon area.I want to select
> those markers.
>
> Please can anybody tell the solution for this using Adobe flex.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---