Google exposes data in a KMLFeatureData when you click entities in a KML Layer. However, there doesn't seem to be a good way to get the individual Markers, Polylines, or Polygons. What methods do people use to generate sidebars or lists of the elements in a KML layer? I've thought of maintaining a separately parsed list to generate a sidebar, but that seems like a duplication of work that shouldn't be necessary. The GeoXML3 project offers one parsing alternative,开发者_开发技巧 but I haven't had much luck doing what I want.
What techniques for generating clickable sidebars do you use with Google's KML layers?
While I am not intimately familiar with KML I see that you have no answers and would like to at least point in a direction (hopefully the right one).
http://code.google.com/apis/kml/documentation/kmlreference.html
Also the GeoXML3 project (that you did not have much luck in doing what you wanted) was inspired by another. I was wondering if you had gone to that as well. (http://econym.org.uk/gmap/egeoxml.htm) ? It seems that if offers a little more info than that of the Wiki from the GeoXML3 project.
I hope that this has aided you in some way and if not I would like to know so that I may attempt to do better in the future.
~The end of the Journey is not as great as the Journey itself.
If you are taking JSON responses then you can make a hash table for markers since they have genuine identity. If you are taking XML responses then XPath selection seems a kind of reasonable middle ground choice.
精彩评论