..and who told you what to write in the first "if"? The "addGMarker" method returns an object, and according to the documentation one could call the "remove" method on that object. Says here on the page it's deprecated. What version of GMaps are you using?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]