我怎么能加载谷歌地图后警报 [英] how can i put an alert after loading google map
问题描述
加载谷歌地图后有没有办法执行一个函数?
在我的网站上有一个谷歌地图
在此网站中,Google地图通过Google API使用以下网址执行:http://maps.googleapis.com/maps/api/js?sensor = true& libraries = places
我想在本网站加载Google地图后放置一个警告框。
有什么方法可以识别地图何时完全加载?
请帮助我
对于地图,当可见图块加载完成时会触发:
google.maps.event
.addListenerOnce( mapinstance,'tilesloaded',function(){alert('map is ready');});
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
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');});
这篇关于我怎么能加载谷歌地图后警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!