123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414 |
- <!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>物流运输图 | Echarts扩展支持|三维地图 </title>
- <!--第三方lib-->
- <script
- type="text/javascript"
- src="../lib/include-lib.js"
- libpath="../lib/"
- include="jquery,font-awesome,bootstrap,layer,haoutil,turf,mars3d,mars3d-echarts"
- ></script>
- <link href="css/style.css" rel="stylesheet" />
- </head>
- <body class="dark">
- <!--加载前进行操作提示,优化用户体验-->
- <div id="mask" class="signmask" onclick="removeMask()"></div>
- <div id="mars3dContainer" class="mars3d-container"></div>
- <script src="./js/common.js"></script>
- <script type="text/javascript">
- "use script"; //开发环境建议开启严格模式
- var map;
- function initMap(options) {
- //合并属性参数,可覆盖config.json中的对应配置
- var mapOptions = mars3d.Util.merge(options, {
- scene: {
- center: { lat: 14.986428, lng: 113.87451, alt: 3519007, heading: 353, pitch: -69 },
- },
- });
- //创建三维地球场景
- map = new mars3d.Map("mars3dContainer", mapOptions);
- //创建Echarts图层
- createEchartsLayer();
- }
- function createEchartsLayer() {
- var options = getEchartsOption();
- var echartsLayer = new mars3d.layer.EchartsLayer(options);
- map.addLayer(echartsLayer);
- }
- function getEchartsOption(data) {
- var allData = {
- citys: [
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u8087\u5e86",
- value: [112.47, 23.05, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u5fb7\u9633",
- value: [104.38, 31.13, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u8861\u9633",
- value: [112.57, 26.9, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u6069\u65bd",
- value: [109.47, 30.3, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u54b8\u9633",
- value: [108.7, 34.33, 2],
- symbolSize: 1.0,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u8302\u540d",
- value: [110.92, 21.67, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u91cd\u5e86",
- value: [106.55, 29.57, 2],
- symbolSize: 8.0,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u6b66\u6c49",
- value: [114.3, 30.6, 2],
- symbolSize: 11.0,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u6c88\u9633",
- value: [123.43, 41.8, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u6d77\u53e3",
- value: [110.32, 20.03, 2],
- symbolSize: 1,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u4e0a\u6d77",
- value: [121.47, 31.23, 2],
- symbolSize: 5.0,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u5e7f\u5dde",
- value: [113.5107, 23.2196, 2],
- symbolSize: 5.0,
- },
- {
- itemStyle: {
- normal: {
- color: "#58B3CC",
- },
- },
- name: "\u8346\u95e8",
- value: [112.2, 31.03, 2],
- symbolSize: 1,
- },
- ],
- movelines: [
- {
- toName: "\u91cd\u5e86",
- fromName: "\u54b8\u9633",
- coords: [
- [108.7, 34.33],
- [106.55, 29.57],
- ],
- },
- {
- toName: "\u4e0a\u6d77",
- fromName: "\u91cd\u5e86",
- coords: [
- [106.55, 29.57],
- [121.47, 31.23],
- ],
- },
- {
- toName: "\u91cd\u5e86",
- fromName: "\u6b66\u6c49",
- coords: [
- [114.3, 30.6],
- [106.55, 29.57],
- ],
- },
- {
- toName: "\u5fb7\u9633",
- fromName: "\u6b66\u6c49",
- coords: [
- [114.3, 30.6],
- [104.38, 31.13],
- ],
- },
- {
- toName: "\u4e0a\u6d77",
- fromName: "\u6b66\u6c49",
- coords: [
- [114.3, 30.6],
- [121.47, 31.23],
- ],
- },
- {
- toName: "\u8087\u5e86",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [112.47, 23.05],
- ],
- },
- {
- toName: "\u8861\u9633",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [112.57, 26.9],
- ],
- },
- {
- toName: "\u6069\u65bd",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [109.47, 30.3],
- ],
- },
- {
- toName: "\u8302\u540d",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [110.92, 21.67],
- ],
- },
- {
- toName: "\u6b66\u6c49",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [114.3, 30.6],
- ],
- },
- {
- toName: "\u6d77\u53e3",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [110.32, 20.03],
- ],
- },
- {
- toName: "\u5e7f\u5dde",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [113.5107, 23.2196],
- ],
- },
- {
- toName: "\u8346\u95e8",
- fromName: "\u4e0a\u6d77",
- coords: [
- [121.47, 31.23],
- [112.2, 31.03],
- ],
- },
- {
- toName: "\u4e0a\u6d77",
- fromName: "\u5e7f\u5dde",
- coords: [
- [113.5107, 23.2196],
- [121.47, 31.23],
- ],
- },
- {
- toName: "\u6c88\u9633",
- fromName: "\u5e7f\u5dde",
- coords: [
- [113.5107, 23.2196],
- [123.43, 41.8],
- ],
- },
- ],
- };
- var option = {
- animation: false,
- backgroundColor: "rgba(17, 19, 42, 0.4)",
- title: {
- text: "火星科技物流运输图",
- left: "center",
- textStyle: {
- color: "#fff",
- },
- },
- legend: {
- show: false,
- orient: "vertical",
- top: "bottom",
- left: "right",
- data: ["地点", "线路"],
- textStyle: {
- color: "#fff",
- },
- },
- series: [
- {
- name: "地点",
- type: "effectScatter",
- coordinateSystem: "mars3dMap",
- zlevel: 2,
- rippleEffect: {
- brushType: "stroke",
- },
- label: {
- emphasis: {
- show: true,
- position: "right",
- formatter: "{b}",
- },
- },
- symbolSize: 2,
- showEffectOn: "render",
- itemStyle: {
- normal: {
- color: "#46bee9",
- },
- },
- data: allData.citys,
- },
- {
- name: "线路",
- type: "lines",
- coordinateSystem: "mars3dMap",
- zlevel: 2,
- large: true,
- effect: {
- show: true,
- constantSpeed: 30,
- symbol: "pin",
- symbolSize: 4,
- trailLength: 0,
- },
- lineStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [
- {
- offset: 0,
- color: "#58B3CC",
- },
- {
- offset: 1,
- color: "#F58158",
- },
- ],
- false
- ),
- width: 1.5,
- opacity: 0.4,
- curveness: 0.1,
- },
- },
- data: allData.movelines,
- },
- ],
- };
- return option;
- }
- </script>
- </body>
- </html>
|