Package Exports
- hn-map
- hn-map/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hn-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
使用步骤
1、根页面按需引入以下文件
<!-- Cesium -->
<link href="./lib/Cesium/Widgets/widgets.css" rel="stylesheet" type="text/css"/>
<script src="./lib/Cesium/Cesium.js" type="text/javascript"></script>
<script src="./lib/turf/turf.min.js" type="text/javascript"></script>
<!-- 引入mars3d库lib -->
<link href="./lib/mars3d/mars3d.css" rel="stylesheet" type="text/css"/>
<script src="./lib/mars3d/mars3d.js" type="text/javascript"></script>
<script src="./lib/mars3d/plugins/heatmap/heatmap.js" type="text/javascript"></script>
<script src="./lib/mars3d/plugins/heatmap/mars3d-heatmap.js" type="text/javascript"></script>
<!-- 高德 -->
<script src="https://webapi.amap.com/maps?v=2.0&key=xxxxxxxxxxx&plugin=AMap.HeatMap,AMap.MarkerCluster,AMap.MoveAnimation"></script>
<script src="https://a.amap.com/jsapi_demos/static/data3d/lib/three.117.js"></script>
<script src="https://a.amap.com/jsapi_demos/static/data3d/lib/GLTFLoader.117.min.js"></script>
<!-- 思极-->
<script src="https://map.sgcc.com.cn/maps?v=3.0.0"></script>
使用
1、创建地图对象
const hnMap = new HnMap(id, mapOption, mapType)