ivory-google-map icon indicating copy to clipboard operation
ivory-google-map copied to clipboard

function load

Open hamid80386 opened this issue 6 years ago • 2 comments

i need an example of callback function because need run a js function for when map load complete! i know below code is completely wrong, but may be this clear my purpose

$map->getEventManager()->addEvent(new Event(
    'map001',
    'load',
    'function() {alert("Google Map Load!");}'
));

hamid80386 avatar Aug 15 '17 18:08 hamid80386

Hum, can your refine your demand? You are looking for an event which is triggered when a map is fully loaded?

egeloen avatar Aug 16 '17 18:08 egeloen

Eexactly! I want a way for run myfunction when map fully loaded, for more explantion i have below function:

		$("#map_canvas").load(function(e) {
				if(markersi==0){
					map001.addListener('click', function(event) {
						placeMarker(event.latLng , map001);
					});
				} 
    	        })

But it's not work, because $("#map_canvas").load has not relation to load map.

below function not work too and say

google is not defined

			google.maps.event.addListenerOnce(map001, 'idle', function(){
				if(markersi==0){
					map001.addListener('click', function(event) {
						placeMarker(event.latLng , map001);
					});
				}
			});

I want a real funtion that work!

hamid80386 avatar Aug 18 '17 17:08 hamid80386