Prereqisites:
1. Complex polygons loaded into map via GGeoXml.
2. Arbitrary point on a map.

Demonstrator: http://bugs.satbeams.com/test/
  Click the polygons area and see the reaction: if the selected point
resides inside the polygon's boundaries, marker icon should show '99',
otherwise the marker should be empty.

Problem description:
  If the polygon has no "holes" (no innerBoundaryIs elements)
everything works fine and GPolygon.getVertex() returns
outerBoundaryIs, so that we can do the math correctly. But when the
polygon has one or more "holes" (innerBoundaryIs) GPolygon.getVertex()
returns one of innerBoundaryIs, not outerBoundaryIs. As a result we
cannot determine correctly if the selected point is inside the
polygon's boundaries or not.
  If a polygon has multiple "holes", then the function returns the
last innerBoundaryIs.

  Another way to see the problem is to click 'Edit' button and see
which areas become "editable".

Requested solution:
  How to determine if the point is inside the specific polygon or not?
  What is the way to get correct boundaries, when polygon has "holes"?

Extra information:
  The demonstrator uses undocumented property to retrieve GPolygon
object from GGeoXml's properties. The on-overlay-adding event is
intercepted via GEvent.addListener(map, 'addoverlay', map_addoverlay)
call, and then we check presence of undocumented property parentGeoXml
in overlay.

  How to retrieve GPolygon from GGeoXml using only documented
properties?

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