AnsweredAssumed Answered

Scale range for HTML widget "Track current location" and "Locate button"?

Question asked by map@giscube.ch on Aug 17, 2017

ArcGIS Web APIJavaScript API4.4

 

Be the next two widget in the developer I could not find.
I would like to define the zoom level or the scale range of the result.
With what command would this work?
Because of the mobile phone and the vehicle I see the houses and by walking then the village ...
Go with me not so completely, enclosed the two links directly to the Developers pages:

Track current location

Locate button

 

Thanks for the help and support!

Mike

 

Code exempel:

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Track current location - 4.4</title>

<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.4/esri/css/main.css">
<script src="https://js.arcgis.com/4.4/"></script>

<script>
require([
"esri/widgets/Track",
"esri/views/MapView",
"esri/Map",
"dojo/domReady!"
], function(
Track, MapView, Map
) {

var map = new Map({
basemap: "topo"
});

var view = new MapView({
map: map,
container: "viewDiv"
});

// Create an instance of the Track widget
// and add it to the view's UI
var track = new Track({
view: view
});
view.ui.add(track, "top-left");

// The sample will start tracking your location
// once the view becomes ready
view.then(function() {
track.start();
});
});
</script>
<div id="viewDiv"></div>
</body>
</html>

Outcomes