I am having trouble removing placemarks. My pickup function picks up the passengers and renders the seating chart correctly, but placemarks from the 3D map are not being removed, thus I can pickup a passenger multiple times. What I am doing in the pickup function is: if the passenger is within range, I update the shuttle.seats[] array, render the seating chart again, and then use the following code to remove the placemark:

var features = earth.getFeatures();
features.removeChild(placemark);   // i've already made the placemark to be global

but placemarks are unaffected and they stay there. What am I doing wrong?

  • 2
    Each passenger has a placemark associated with him/her. How are you initializing placemark to the placemark of a passenger?
    – kzidane
    Sep 25, 2014 at 12:15

1 Answer 1


Your removeChild(placemark) won't work, because it calls the wrong property.

If you added the placemark to PASSENGERS[i], you need to access placemark from PASSENGERS[i].placemark, not just placemark.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .