0

Follow geoXML3 api.. after every KML parse a JSON object mapping all tags is created.

SO is it possible o get that JSON object, make some modify, like update or remove some element.. AND create a NEW kml (dynamically) and show that changes visually?

I tried many times to modify the Json object but all modify in json not affect the kml rendered .. ..so the solution is create a new kml and show..( BUT HOW ?)

geocodezip
  • 158,664
  • 13
  • 220
  • 245

1 Answers1

0

geoxml3 is a KML parser, it doesn't have the ability to create KML. You can add code to traverse its arrays holding the native Google Maps API objects and create KML that represents them.

If you want to modify the rendered Google Maps API objects, they are stored in arrays, you can get references to them and modify them dynamically.

I do not have a complete example (at least that I recall), that traverses the native Google Maps API objects and creates KML, but this page will create the <coordinates> piece for a single piece of a polygon:

http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_winding_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/crues_450_windingFix_kml.xml

geocodezip
  • 158,664
  • 13
  • 220
  • 245
  • OK using some code to traverse .. and create a KML ... how can I do that ? Using geoxml3 .. How can I use json object that was created ? Could I creating a string and load it ? – Luiz Zelaquett Sep 17 '12 at 17:43