http://jsfiddle.net/michaelgruber/M84T7/
When the codeAddress function is run more than once (when multiple inputs are run) the old markers are saved on the map. Why is this? Shouldn’t the MyMap.marker be overwritten?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, but it is a reference to the marker not the marker itself.
To hide the marker:
Before you overwrite it and lose the reference.
http://jsfiddle.net/zbZ8p/1/