123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0" />
- <meta name="author" content="火星科技 http://mars3d.cn " />
- <meta name="apple-touch-fullscreen" content="yes" />
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
- <meta name="format-detection" content="telephone=no" />
- <meta name="x5-fullscreen" content="true" />
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
- <!-- 标题及搜索关键字 -->
- <meta name="keywords" content="火星科技,cesium,3D,GIS,marsgis,三维,地球,地图,开发,框架,系统,示例,资料,模型,离线,外包,合肥,安徽,中国" />
- <meta
- name="description"
- content="火星科技 合肥火星 合肥火星科技 合肥火星科技有限公司 leaflet leaflet框架 leaflet开发 cesium cesium开发 cesium框架 三维 地球 模型 gis marsgis 地图离线 地图开发 地图框架 地图外包 框架 开发 外包 地图离线 二维地图 三维地图 全景漫游 地理信息系统 云GIS 三维GIS GIS平台 WebGIS"
- />
- <link rel="shortcut icon" type="image/x-icon" href="" />
- <title>basemaps 瓦片底图 </title>
- <!--第三方lib-->
- <script
- type="text/javascript"
- src="../lib/include-lib.js"
- libpath="../lib/"
- include="jquery,font-awesome,bootstrap,layer,haoutil,mars3d"
- ></script>
- <link href="css/style.css" rel="stylesheet" />
- </head>
- <body class="dark">
- <div id="mars3dContainer" class="mars3d-container"></div>
- <script type="text/javascript">
- "use script"; //开发环境建议开启严格模式
- $(document).ready(function () {
- if (!mars3d.Util.webglreport()) {
- mars3d.Util.webglerror();
- return;
- }
- initMap();
- });
- function initMap() {
- //在创建地球前的传参中配置basemaps参数
- var map = new mars3d.Map("mars3dContainer", {
- scene: {
- center: { lat: 14.029537, lng: 105.94238, alt: 4879779, heading: 360, pitch: -66 },
- },
- control: {
- baseLayerPicker: true, //basemaps底图切换按钮
- homeButton: true, //视角复位按钮
- sceneModePicker: true, //二三维切换按钮
- navigationHelpButton: true, //帮助按钮
- fullscreenButton: true, //全屏按钮
- defaultContextMenu: true, //右键菜单
- },
- basemaps: [
- {
- name: "天地图影像",
- icon: "img/basemaps/tdt_img.png",
- type: "tdt",
- layer: "img_d",
- key: ["9ae78c51a0a28f06444d541148496e36"],
- show: true,
- },
- {
- name: "离线地图",
- icon: "img/basemaps/mapboxSatellite.png",
- type: "xyz",
- url: "//data.mars3d.cn/tile/googleImg/{z}/{x}/{y}.jpg",
- maximumLevel: 12,
- },
- {
- name: "单张图片",
- icon: "img/basemaps/offline.png",
- type: "image",
- url: "//data.mars3d.cn/file/img/world/world.jpg",
- },
- ],
- });
- //根据config配置的id或name属性,更新显示指定的地图底图
- // map.basemap = '离线地图'
- //basemaps说支持的图层类型(tileLayer)
- // "type": "image"
- // "type": "xyz"
- // "type": "wms"
- // "type": "wmts"
- // "type": "tms"
- // "type": "arcgis"
- // "type": "arcgis_cache"
- // "type": "gee"
- // "type": "tileinfo" 瓦片信息(一般用于测试)
- // "type": "grid" 网格线(一般用于无地图模式)
- // "type": "tdt"
- // "type": "gaode"
- // "type": "baidu"
- // "type": "tencent"
- // "type": "osm"
- // "type": "google"
- // "type": "bing"
- // "type": "mapbox"
- // "type": "ion"
- }
- </script>
- </body>
- </html>
|