How to use tilesloaded event for google maps v3

风格不统一 提交于 2019-12-23 13:06:55

问题


Here I have a code:

<script>

$(function() {
    $( "#photo" ).resizable();
  $( "#photo" ).draggable({revert: 'invalid'});
    $( "#left" ).droppable({
      accept: '#photo',
      drop: function( event, ui ) {
        $( this )
          .find( "p" )
            .html( "Dropped!" );
      }
    });
  });    
    </script>

and this code I must run after full loading google maps, so I need to "hook up" tilesloaded event for this code.

http://jsbin.com/ayugun/7/edit

But how to do that?


回答1:


Here is the code

google.maps.event.addListener(map, 'tilesloaded', function() {
  doWhatYouWant();
});


来源:https://stackoverflow.com/questions/17122928/how-to-use-tilesloaded-event-for-google-maps-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!