ArcGIS API for JavaScript 学习(一) 创建三维地图

创建三维地图。

参考网址:https://developers.arcgis.com/javascript/latest/sample-code/intro-sceneview/index.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>三维地图</title>
    <style>
        html, body, #viewDiv {
            padding: 0;
            margin: 60px;
            height: 90%;
            width: 90%;
        }
    </style>
    <link rel="stylesheet" href="https://js.arcgis.com/4.6/esri/css/main.css">
    <script src="https://js.arcgis.com/4.6/"></script>
    <script>
        require([
            "esri/Map",
            "esri/views/SceneView",
            "dojo/domReady!"
        ], function(Map, SceneView){
            var map = new Map({
                basemap: "streets",
                ground: "world-elevation"
            });
            var view = new SceneView({
                container: "viewDiv",     // Reference to the scene div created in step 5
                map: map,                 // Reference to the map object created before the scene
                scale: 50000000,          // Sets the initial scale to 1:50,000,000
                center: [108.95, 34.53]  // Sets the center point of view with lon/lat
            });
        });
    </script>
</head>
<body>
<div id="viewDiv"></div>
<div style="left: 600px; position: absolute; top: 60px;"><font size="8" color="#00bfff"  >三维地图</font></div>
</body>
</html>
效果如图:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值