how can i put an alert after loading google map
Asked Answered
S

1

1

Is there any way to execute a function after loading google map ? There is a google map in my site

In this site the Google map is executing with the Google API using the URL :http://maps.googleapis.com/maps/api/js?sensor=true&libraries=places

I want to put an alert box after loading Google map in this site.

Is there any way to recognize when the map is fully loaded?

Please help me

Salesgirl answered 19/12, 2012 at 7:36 Comment(0)
S
4

there is a tilesloaded-event for the map, it fires when the visible tiles have finished loading:

google.maps.event
 .addListenerOnce(mapinstance, 'tilesloaded', function(){alert('map is ready');});
Stanfordstang answered 19/12, 2012 at 7:43 Comment(1)
i can't put the .addListenerOnce. it does'nt recogniseSalesgirl

© 2022 - 2024 — McMap. All rights reserved.