ArcGIS API for JavaScript
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ArcGIS API for JavaScript相关的知识,希望对你有一定的参考价值。
好几个月没用ArcGIS API for javascript,去官网看了一下,最新api已经是4.0了,也开始支持3D了,先运行看看吧。
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> 6 <title>Get started with SceneView - Create a 3D map</title> 7 <style> 8 html, body, #viewDiv { 9 padding: 0; 10 margin: 0; 11 height: 100%; 12 width: 100%; 13 } 14 </style> 15 <link rel="stylesheet" href="https://js.arcgis.com/4.0/esri/css/main.css"> 16 <script src="https://js.arcgis.com/4.0/"></script> 17 <script> 18 require([ 19 "esri/Map", 20 "esri/views/SceneView", 21 "dojo/domReady!" 22 ], function(Map, SceneView){ 23 var map = new Map({ 24 basemap: "streets", 25 ground: "world-elevation" 26 }); 27 var view = new SceneView({ 28 container: "viewDiv", // Reference to the scene div created in step 5 29 map: map, // Reference to the map object created before the scene 30 scale: 50000000, // Sets the initial scale to 1:50,000,000 31 center: [-101.17, 21.78] // Sets the center point of view with lon/lat 32 }); 33 }); 34 </script> 35 </head> 36 <body> 37 <div id="viewDiv"></div> 38 </body> 39 </html>
以上是关于ArcGIS API for JavaScript的主要内容,如果未能解决你的问题,请参考以下文章
arcgis api for javascript 4.10版本的本地部署
Map学习(arcgis api for javascript3.18)
ArcGIS API for JavaScript学习:第一个地图