Problem creating pointPlacemarks

39 views
Skip to first unread message

Antonio Manuel Acevedo

unread,
Apr 19, 2012, 10:14:24 AM4/19/12
to google-earth-...@googlegroups.com
Hi all!

I´m having a situation and i´ve not found any information about that.

I´m going to recreate a situation to explain my problem:

 1. I create 5 placemaks (id's 1,2,3,4 and 5 respectively)
 2. I remove placemarks with id=4 and id=5 from a button click.
 3. I try to create one new placemark that need have id=4 because in that moment there are only 3 placemarks in the map.

My problem is within point 3. I´m not able to create that new placemark with same id that removed placemark has...

Any suggestions?

Thanks a lot ;)

Greg-WBSR

unread,
Apr 19, 2012, 12:59:05 PM4/19/12
to KML Developer Support - Google Earth Plug-in
You cannot re-use 'id's when creating objects using the API.

You can either create a new placemark with id of '6' (use a var count
that you increment each time you create a new one)
or
Show/Hide the placemarks with <visibility> rather than remove/create

Antonio Manuel Acevedo

unread,
Apr 20, 2012, 6:34:21 AM4/20/12
to google-earth-...@googlegroups.com
I thought that...ok.

Then i´m gonna need to change all my application logic...

Thanks! ;)
Reply all
Reply to author
Forward
0 new messages