Note that there are some explanatory texts on larger screens.

plurals
  1. POaddListener for Google Maps
    primarykey
    data
    text
    <p>I would like to print a google map, after the map is fully loaded.</p> <p>[..]</p> <pre><code>&lt;link href="http://code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" /&gt; &lt;script type="text/javascript" src="http://maps.google.de/maps/api/js?sensor=false"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; var directionsService = new google.maps.DirectionsService(); var map; var gh; function initialize() { //alert("Starte Funktion"); directionsDisplay = new google.maps.DirectionsRenderer(); gh = new google.maps.LatLng(41.850033, -7.6500523); var myOptions = { zoom:15, mapTypeId: google.maps.MapTypeId.ROADMAP, center: gh } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); directionsDisplay.setMap(map); } function calcRoute() { //alert("Starte calcRoute"); //alert("&lt;?php echo $adresse; ?&gt;"); var start = "Recklinghausen Akkoallee 45"; var end = "Recklinghausen &lt;?php echo $adresse; ?&gt;"; var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING, avoidHighways: true, }; directionsService.route(request, function(result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); } }); google.maps.event.addListenerOnce(map,'idle', function(){ alert('Funktion wird aufgerufen!'); //window.print(); }); } &lt;/script&gt; </code></pre> <p>[..]</p> <pre><code>&lt;body onload="initialize();calcRoute();"&gt; </code></pre> <p></p> <p>But the addListener fires the information when the map is started and not fully loaded?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload