File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,12 @@ function locationSuccess(position) {
39
39
locationText . textContent = `lat/long:${ c . latitude } /${ c . longitude } speed:${ c . speed } heading:${ c . heading } altitude:${ c . altitude } accuracy:${ c . accuracy } altaccuracy:${ c . altitudeAccuracy } timestamp:${ position . timestamp } ` ;
40
40
const latlng = [ c . latitude , c . longitude ] ;
41
41
if ( npositions == 0 ) {
42
- map . flyTo ( latlng , Number ( zoomLevel ) , { animate :true } ) ;
42
+ console . log ( "Flying to" , zoomLevel , latlng ) ;
43
+ //map.flyTo(latlng, Number(zoomLevel), {animate:true}); // Flying takes too long and stops when the next location comes in
44
+ map . setView ( latlng , zoomLevel ) ;
45
+
43
46
} else {
47
+ console . log ( "Panning to" , latlng ) ;
44
48
map . panTo ( latlng ) ;
45
49
}
46
50
breadCrumbLine . addLatLng ( latlng ) ;
You can’t perform that action at this time.
0 commit comments