GoogleMaps v3 API Create only 1 marker on click

后端 未结 5 2024
孤城傲影
孤城傲影 2020-12-01 10:30

I am successfully creating a marker on click however, using the following code, I get a new marker with every click, I only ever want one marker added and if someone clicks

5条回答
  •  再見小時候
    2020-12-01 11:16

    this works fine jsfiddle http://jsfiddle.net/incals/o7jwuz12

    and this for complete code: https://github.com/Lavkushwaha/Google_Maps_API_Without_PHP_DOM/blob/master/single.html

提交回复
热议问题