Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use tilesloaded event for google maps v3

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?

like image 771
Mark West Avatar asked Jun 15 '13 11:06

Mark West


1 Answers

Here is the code

google.maps.event.addListener(map, 'tilesloaded', function() {
  doWhatYouWant();
});
like image 123
Premshankar Tiwari Avatar answered Oct 24 '22 01:10

Premshankar Tiwari