Note that there are some explanatory texts on larger screens.

plurals
  1. POI lost map zoom by using directions with sencha touch
    primarykey
    data
    text
    <p>i have a view to show a map with the direction between start and end point.</p> <p>the direction is ok, but i lost the zoom factor and the zoom is 0.</p> <p>when i delete 'directionsDisplay.setMap(gmap);', the zoom factor is ok.</p> <p>here i read to set a timeout, but i don't know on which place i have to do this...? <a href="http://www.sencha.com/forum/showthread.php?193567-2.0.1-Map-Directions-Not-Zooming-to-correct-level-or-not-showing" rel="nofollow">http://www.sencha.com/forum/showthread.php?193567-2.0.1-Map-Directions-Not-Zooming-to-correct-level-or-not-showing</a></p> <p>here is my code:</p> <pre><code>Ext.define("ElectroRadar.view.map.Start", { extend: 'Ext.Map', xtype: 'maptest', config: { title: 'Karte', iconCls: 'maps', id:'menuMap2', mapOptions: { zoom : 15, mapTypeId : google.maps.MapTypeId.ROADMAP, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.DEFAULT } }, listeners: [ { fn: 'onMapMaprender', event: 'maprender' } ] }, onMapMaprender: function(map, gmap, options) { var start = ''; navigator.geolocation.getCurrentPosition(function(position) { var start = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); var end = new google.maps.LatLng(54.5625461,9.9488523); var directionsDisplay = new google.maps.DirectionsRenderer(); var directionsService = new google.maps.DirectionsService(); directionsDisplay.setMap(gmap); var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); }); }}); </code></pre> <p>what can i change in my code, that a zoom is used for the best directions view?</p> <p>here you can see it: <a href="http://wachtelborn.net/_ansicht/event/mobile/4/" rel="nofollow">http://wachtelborn.net/_ansicht/event/mobile/4/</a></p> <p>navigate to 'karte'</p>
    singulars
    1. This table or related slice is empty.
    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.
    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