On 23 déc, 11:14, Rossko <[email protected]> wrote: > > A quick look on the link you gave and if I understand it right, it is > > possible to get the name of one polygon and an id. How do you get > > these informations ? > > GGeoXml makes up its own id, which you can grab by the intercept > technique. > > > Once you have the name or the id of the polygon, > > is it possible to apply an event on that polygon ? > > Once you have some kind of handle to the javascript object > representing the individual overlay, you can apply event listeners. > That's the part GGeoXml usually hides from you and needs to be dug > out. > > > Or, maybe a better way of doing it is to use EGeoXML and then try to > > determine if the click is in a polygon using EPolys. But it's quite > > complicated > > Yep, whichever way you go about it. Personally I would use EGeoXml > because you have full access to the objects it creates, and there is > no risk of 'interception' going wrong if GGeoXml changes in future. >
> > ... and maye it wouldn't be really effective since I've gote > > three different polygons based on three different kml files. > > That's not much of an issue really ; whichever parser you use you can > maintain three distinct collections of overlays. > var groupA = GGeoXml(...); > var groupB = GGeoXml(...); Thanks for these infomations. But I have some difficulties using EGeoXML, more particulary undestanding the use of the constructors that are listed in http://econym.org.uk/gmap/egeoxml.htm I've understood that we can use our own polygon definition and options with {createpolygon: ... } and {polygonoptions:{ ... }} but I don't see how to use the GPolygon class : to create a polygon we need coordinates but my coordinates come from my xml/kml file. Could you give me a quick example ? Thanks a lot. -- 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.
