Adding multiple points to Google Map with Javascript v3 API

后端 未结 1 1298
猫巷女王i
猫巷女王i 2021-02-07 10:42

I\'ve been stuck on this for a few days now. I\'m having issues adding multiple points to a map using v3 of the Javascript API.

I read this thread and this thread and a

1条回答
  •  醉酒成梦
    2021-02-07 10:53

    The problem is here:

    info_window.open(map, this);
    

    It should be:

    info_window.open(google_map, this);
    

    because there's no variable here named map. Working version here: http://jsfiddle.net/nrabinowitz/2DBXY/

    If you're not doing so yet, try using a tool like Firebug or the Chrome console - debugging Javascript is almost impossible without one.

    0 讨论(0)
提交回复
热议问题