My Track implementation has the gotoOverride set to a function. I need this because I want to keep the zoom level the same as the view. Without gotoOverride set to a function that changes the zoom, Track will always zoom deep to the position you are at.
I have some HTML INPUT fields, where I want to enter data.
If Track is running, and I want to enter data in the INPUT field (keyboard is up), the keyboard on iOS and Android slides down when Track function provides a new coordinate.
When I remove this line out of my code: return view.goTo(options.target); , the keyboard stays on the screen but, logically, I miss the 'not zoom' function.
How can this be solved?
Here is my code:
var track = new Track({
view: view,
goToOverride: function(view, options) {
options.target.scale = view.scale;
return view.goTo(options.target);
},
geolocationOptions: {
maximumAge: 0,
timeout: 15000,
enableHighAccuracy: true
},
graphic: new Graphic({
symbol: {
type: "simple-marker",
path: "M 14 -22 L 23.5 0 L 14 -5 L 5.5 0 z",
color: "#005e96",
outline: {
color: "#AAAAAA",
width: 0.75
},
size: 15
},
}),
useHeadingEnabled: false // Don't change orientation of the map
});
view.ui.add(track, "top-left");