Google Maps custom infobox

前端 未结 3 1309
小蘑菇
小蘑菇 2021-01-14 19:09

I\'m trying to incorporate a custom infobox as per this example but my code just doesn\'t work. Could someone take a look and see where I\'m going wrong?

I\'ve comme

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 19:39

    Alright than get inbox.js file from http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/ include in your html/jsp. You need to remove infowindow object from your code too

    and modify your code with

    function setMarkers(map, markers) {
      ......// same as your code
      var ib = new InfoBox(myOptions);
      google.maps.event.addListener(marker, "click", function (e) {
            ib.open(map, this);
        });
      .....//same as your code
    }
    

    If you won't succeed first time than we may need to try few times. Please post your modified code with result every time.

提交回复
热议问题