6

在桌面浏览器中,使用鼠标单击拖放一切正常,但不适用于触摸屏。我需要做什么才能在移动(平板电脑和手机)浏览器中启用标记的拖动?

map = new google.maps.Map(document.getElementById('map_canvas'),
                mapOptions);
 google.maps.event.addListener(map, 'center_changed', function() {
   window.setTimeout(function() {
      map.panTo(marker.getPosition());
     }, 3000);
  }); 


        marker = new google.maps.Marker({
          map:map,
          draggable: true,
          animation: google.maps.Animation.DROP,
          position: parliament,
          icon: psrimage
        }); 
4

0 回答 0