<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DisplayAMap</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.20/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.20/"></script>
<script>
require([
"esri/config",
"esri/Map",
"esri/views/MapView"
], function(esriConfig, Map, MapView) {
esriConfig.apiKey = "YOUR-KEY";
const map = new Map({
basemap: "arcgis-topographic"
});
const view = new MapView({
map: map,
center: [-118.805, 34.027],
zoom: 13,
container: "viewDiv"
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
WEBGIS加载二维地图
最新推荐文章于 2024-06-12 15:08:05 发布