Last active
June 6, 2020 02:46
-
-
Save jgravois/b7929100e6fd7ddc8de343771c5a281e to your computer and use it in GitHub Desktop.
smooth animation in JSAPI 4.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: apache-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<title>Get started with MapView - Create a 2D map - 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/Map", | |
"esri/views/MapView", | |
"dojo/domReady!" | |
], function(Map, MapView) { | |
var map = new Map({ | |
basemap: "streets-navigation-vector" | |
}); | |
var view = new MapView({ | |
container: "viewDiv", | |
map: map, | |
center: [15, 65], // longitude, latitude | |
zoom: 4, | |
// https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints | |
constraints: { snapToZoom: false } | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="viewDiv"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment