diff --git a/.cache/api-runner-browser-plugins.js b/.cache/api-runner-browser-plugins.js index 7ad21e4a9a..75e686c674 100644 --- a/.cache/api-runner-browser-plugins.js +++ b/.cache/api-runner-browser-plugins.js @@ -6,7 +6,7 @@ module.exports = [{ options: {"plugins":[]}, },{ plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'), - options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#722ED1","theme_color":"#722ED1","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, + options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#1890FF","theme_color":"#1890FF","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, },{ plugin: require('../node_modules/gatsby-plugin-catch-links/gatsby-browser.js'), options: {"plugins":[]}, @@ -18,10 +18,13 @@ module.exports = [{ options: {"plugins":[],"component":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/layouts/layout.tsx"}, },{ plugin: require('../node_modules/gatsby-plugin-nprogress/gatsby-browser.js'), - options: {"plugins":[],"color":"#722ED1"}, + options: {"plugins":[],"color":"#1890FF"}, + },{ + plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'), + options: {"plugins":[],"trackingId":"UA-148148901-7"}, },{ plugin: require('../node_modules/@antv/gatsby-theme-antv/gatsby-browser.js'), - options: {"plugins":[],"pathPrefix":"/gatsby-theme-antv"}, + options: {"plugins":[],"pathPrefix":"/l7","GATrackingId":"UA-148148901-7","theme":{"primary-color":"#722ED1"}}, },{ plugin: require('../gatsby-browser.js'), options: {"plugins":[]}, diff --git a/.cache/api-runner-ssr.js b/.cache/api-runner-ssr.js index 5fb3dac4d8..12121ee2a3 100644 --- a/.cache/api-runner-ssr.js +++ b/.cache/api-runner-ssr.js @@ -9,10 +9,16 @@ var plugins = [{ options: {"plugins":[]}, },{ plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-manifest/gatsby-ssr'), - options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#722ED1","theme_color":"#722ED1","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, + options: {"plugins":[],"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#1890FF","theme_color":"#1890FF","display":"minimal-ui","icon":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/images/favicon.png"}, },{ plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-layout/gatsby-ssr'), options: {"plugins":[],"component":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/site/layouts/layout.tsx"}, + },{ + plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/gatsby-plugin-google-analytics/gatsby-ssr'), + options: {"plugins":[],"trackingId":"UA-148148901-7"}, + },{ + plugin: require('/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/node_modules/@antv/gatsby-theme-antv/gatsby-ssr'), + options: {"plugins":[],"pathPrefix":"/l7","GATrackingId":"UA-148148901-7","theme":{"primary-color":"#722ED1"}}, }] // During bootstrap, we write requires at top of this file which looks like: // var plugins = [ diff --git a/.cache/async-requires.js b/.cache/async-requires.js index 30bb6883cf..8ab3a403ea 100644 --- a/.cache/async-requires.js +++ b/.cache/async-requires.js @@ -2,12 +2,12 @@ const preferDefault = m => m && m.default || m exports.components = { + "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/document.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx" */), + "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/example.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx" */), "component---cache-dev-404-page-js": () => import("dev-404-page.js" /* webpackChunkName: "component---cache-dev-404-page-js" */), "component---node-modules-antv-gatsby-theme-antv-site-pages-index-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/pages/index.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-pages-index-tsx" */), "component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/pages/404.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx" */), - "component---site-pages-index-en-ts": () => import("../site/pages/index.en.ts" /* webpackChunkName: "component---site-pages-index-en-ts" */), - "component---site-pages-index-zh-ts": () => import("../site/pages/index.zh.ts" /* webpackChunkName: "component---site-pages-index-zh-ts" */), - "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/document.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx" */), - "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx": () => import("../node_modules/@antv/gatsby-theme-antv/site/templates/example.tsx" /* webpackChunkName: "component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx" */) + "component---site-pages-index-en-tsx": () => import("../site/pages/index.en.tsx" /* webpackChunkName: "component---site-pages-index-en-tsx" */), + "component---site-pages-index-zh-tsx": () => import("../site/pages/index.zh.tsx" /* webpackChunkName: "component---site-pages-index-zh-tsx" */) } diff --git a/.cache/babelState.json b/.cache/babelState.json index 544fc98adc..64d550db00 100644 --- a/.cache/babelState.json +++ b/.cache/babelState.json @@ -6,6 +6,7 @@ "name": "babel-plugin-import", "options": { "libraryName": "antd", + "libraryDirectory": "es", "style": true } } @@ -29,6 +30,7 @@ "name": "babel-plugin-import", "options": { "libraryName": "antd", + "libraryDirectory": "es", "style": true } } @@ -52,6 +54,7 @@ "name": "babel-plugin-import", "options": { "libraryName": "antd", + "libraryDirectory": "es", "style": true } } @@ -75,6 +78,7 @@ "name": "babel-plugin-import", "options": { "libraryName": "antd", + "libraryDirectory": "es", "style": true } } diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json b/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json new file mode 100644 index 0000000000..130fde67b1 --- /dev/null +++ b/.cache/caches/gatsby-transformer-remark/diskstore-037c6ee2be3b28d965e21fc24fcf1438.json @@ -0,0 +1 @@ +{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-c2b718c76cd6918b08bff6ee4b3a63ea-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json b/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json index 41356475f3..ef5cfad5dc 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-03f70e3c5a52291e52b331e3d35900a4.json @@ -1 +1 @@ -{"expireTime":9007200827957779000,"key":"transformer-remark-markdown-ast-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-99b5b2f90b0432fb92044e231041ffca-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-8589291dd9d97abb4ea73a913e98ba63.json b/.cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json similarity index 65% rename from .cache/caches/gatsby-transformer-remark/diskstore-8589291dd9d97abb4ea73a913e98ba63.json rename to .cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json index d76c9424af..0de8ae1163 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-8589291dd9d97abb4ea73a913e98ba63.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-09120d5540cbb8e1600096c4548475d6.json @@ -1 +1 @@ -{"expireTime":9007200827958508000,"key":"transformer-remark-markdown-html-ast-a1d219db4ea61081778ff63395ff3e91-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-c2b718c76cd6918b08bff6ee4b3a63ea-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json b/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json index 4a54be89ca..a5c47f2711 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-15c9fa5529ebd49664861c7bcf4e6952.json @@ -1 +1 @@ -{"expireTime":9007200827957881000,"key":"transformer-remark-markdown-toc-b203d64bdde854a7c4141aaf3bd814db-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":"
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15}}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39}}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}},{"type":"text","value":"\n"},{"type":"raw","value":"import {Scene} from '@l7/scene';\nconst scene =new L7.Scene({\n id:'map'\n mapStyle:'dark',\n center:[ 110.770672, 34.159869 ],\n pitch:45\n})
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1402},"end":{"line":105,"column":91,"offset":1452}}},{"type":"raw","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1541},"end":{"line":105,"column":202,"offset":1563}}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1563},"end":{"line":105,"column":203,"offset":1564}}},{"type":"raw","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2333},"end":{"line":170,"column":12,"offset":2341}}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2341},"end":{"line":170,"column":28,"offset":2357}}}],"position":{"start":{"line":170,"column":1,"offset":2330},"end":{"line":170,"column":28,"offset":2357}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setzoomandcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setzoomandcenter","aria-label":"setzoomandcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2364},"end":{"line":173,"column":21,"offset":2380}}}],"position":{"start":{"line":173,"column":1,"offset":2360},"end":{"line":173,"column":21,"offset":2380}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2381},"end":{"line":174,"column":10,"offset":2390}}}],"position":{"start":{"line":174,"column":1,"offset":2381},"end":{"line":174,"column":10,"offset":2390}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2591},"end":{"line":188,"column":15,"offset":2601}}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2601},"end":{"line":188,"column":26,"offset":2612}}}],"position":{"start":{"line":188,"column":1,"offset":2587},"end":{"line":188,"column":26,"offset":2612}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoomin"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoomin","aria-label":"zoomin permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2618},"end":{"line":190,"column":11,"offset":2624}}}],"position":{"start":{"line":190,"column":1,"offset":2614},"end":{"line":190,"column":11,"offset":2624}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2625},"end":{"line":191,"column":7,"offset":2631}}}],"position":{"start":{"line":191,"column":1,"offset":2625},"end":{"line":191,"column":7,"offset":2631}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2783},"end":{"line":208,"column":12,"offset":2791}}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2791},"end":{"line":208,"column":27,"offset":2806}}}],"position":{"start":{"line":208,"column":1,"offset":2780},"end":{"line":208,"column":27,"offset":2806}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"panby"},"children":[{"type":"element","tagName":"a","properties":{"href":"#panby","aria-label":"panby permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2812},"end":{"line":210,"column":10,"offset":2817}}}],"position":{"start":{"line":210,"column":1,"offset":2808},"end":{"line":210,"column":10,"offset":2817}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2818},"end":{"line":211,"column":19,"offset":2836}}}],"position":{"start":{"line":211,"column":1,"offset":2818},"end":{"line":211,"column":19,"offset":2836}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2881},"end":{"line":215,"column":13,"offset":2884}}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2884},"end":{"line":215,"column":38,"offset":2909}}},{"type":"raw","value":"y
","position":{"start":{"line":215,"column":50,"offset":2921},"end":{"line":215,"column":53,"offset":2924}}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2924},"end":{"line":215,"column":79,"offset":2950}}}],"position":{"start":{"line":215,"column":1,"offset":2872},"end":{"line":215,"column":79,"offset":2950}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setpitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpitch","aria-label":"setpitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2957},"end":{"line":218,"column":13,"offset":2965}}}],"position":{"start":{"line":218,"column":1,"offset":2953},"end":{"line":218,"column":13,"offset":2965}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2966},"end":{"line":219,"column":9,"offset":2974}}}],"position":{"start":{"line":219,"column":1,"offset":2966},"end":{"line":219,"column":9,"offset":2974}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3029},"end":{"line":224,"column":21,"offset":3036}}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3036},"end":{"line":224,"column":31,"offset":3046}}}],"position":{"start":{"line":224,"column":1,"offset":3016},"end":{"line":224,"column":31,"offset":3046}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":""},"children":[{"type":"element","tagName":"a","properties":{"href":"#","aria-label":" permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":226,"column":1,"offset":3048},"end":{"line":226,"column":5,"offset":3052}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setstatus"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setstatus","aria-label":"setstatus permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3058},"end":{"line":228,"column":14,"offset":3067}}}],"position":{"start":{"line":228,"column":1,"offset":3054},"end":{"line":228,"column":14,"offset":3067}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3068},"end":{"line":229,"column":100,"offset":3167}}}],"position":{"start":{"line":229,"column":1,"offset":3068},"end":{"line":229,"column":100,"offset":3167}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3391},"end":{"line":243,"column":37,"offset":3399}}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3399},"end":{"line":243,"column":53,"offset":3415}}},{"type":"text","value":"[minlng,minlat,maxlng,maxlat]","position":{"start":{"line":243,"column":54,"offset":3416},"end":{"line":243,"column":81,"offset":3443}}}],"position":{"start":{"line":243,"column":1,"offset":3363},"end":{"line":243,"column":82,"offset":3444}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3578},"end":{"line":258,"column":16,"offset":3585}}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3585},"end":{"line":258,"column":25,"offset":3594}}}],"position":{"start":{"line":258,"column":1,"offset":3570},"end":{"line":258,"column":25,"offset":3594}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getlayers-1"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlayers-1","aria-label":"getlayers 1 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3600},"end":{"line":260,"column":14,"offset":3609}}}],"position":{"start":{"line":260,"column":1,"offset":3596},"end":{"line":260,"column":14,"offset":3609}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3610},"end":{"line":261,"column":12,"offset":3621}}}],"position":{"start":{"line":261,"column":1,"offset":3610},"end":{"line":261,"column":12,"offset":3621}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3714},"end":{"line":276,"column":12,"offset":3725}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3725},"end":{"line":276,"column":26,"offset":3739}}},{"type":"raw","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3745},"end":{"line":276,"column":40,"offset":3753}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3753},"end":{"line":276,"column":60,"offset":3773}}}],"position":{"start":{"line":276,"column":1,"offset":3714},"end":{"line":276,"column":60,"offset":3773}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"off"},"children":[{"type":"element","tagName":"a","properties":{"href":"#off","aria-label":"off permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3780},"end":{"line":279,"column":8,"offset":3783}}}],"position":{"start":{"line":279,"column":1,"offset":3776},"end":{"line":279,"column":8,"offset":3783}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3784},"end":{"line":280,"column":7,"offset":3790}}},{"type":"raw","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3796},"end":{"line":280,"column":24,"offset":3807}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3807},"end":{"line":280,"column":38,"offset":3821}}},{"type":"raw","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3827},"end":{"line":280,"column":52,"offset":3835}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3835},"end":{"line":280,"column":72,"offset":3855}}}],"position":{"start":{"line":280,"column":1,"offset":3784},"end":{"line":280,"column":72,"offset":3855}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"地图事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%B0%E5%9B%BE%E4%BA%8B%E4%BB%B6","aria-label":"地图事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3862},"end":{"line":283,"column":9,"offset":3866}}}],"position":{"start":{"line":283,"column":1,"offset":3858},"end":{"line":283,"column":9,"offset":3866}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
内容
"} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"内容
"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json b/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json index 7c0c57c4e5..e55bb68b8a 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-34caa57442541fb555e65adf766c9dbf.json @@ -1 +1 @@ -{"expireTime":9007200827957779000,"key":"transformer-remark-markdown-html-ast-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"内容","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":4}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-51dbb367647851670b43ae45a9e937df-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"内容","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":3,"offset":3}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":4}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json b/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json index a698919854..20cc24e2e5 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-36c2072d077e6736d848e30c50da70bf.json @@ -1 +1 @@ -{"expireTime":9007200827958528000,"key":"transformer-remark-markdown-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a3ad6ea9016c2bbe5a2cd975be604ff5.json b/.cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json similarity index 65% rename from .cache/caches/gatsby-transformer-remark/diskstore-a3ad6ea9016c2bbe5a2cd975be604ff5.json rename to .cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json index 59cbf5730e..1ef21662e7 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a3ad6ea9016c2bbe5a2cd975be604ff5.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-3a971685629ac28e3d3c254ed1dc5e01.json @@ -1 +1 @@ -{"expireTime":9007200828058191000,"key":"transformer-remark-markdown-html-ast-46d92e293407aa2f9b2f1b0b9fc86991-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-781c0a32942295837c2990e69f6d666a-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-3cf9cbd2e002119e2f428dfed8eb94da.json b/.cache/caches/gatsby-transformer-remark/diskstore-3cf9cbd2e002119e2f428dfed8eb94da.json deleted file mode 100644 index 7210b21785..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-3cf9cbd2e002119e2f428dfed8eb94da.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828184475000,"key":"transformer-remark-markdown-html-30a51869612bca077eda87f35f662bad-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-b87fe1434166fa5d7b0fdf27b13495ca.json b/.cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json similarity index 65% rename from .cache/caches/gatsby-transformer-remark/diskstore-b87fe1434166fa5d7b0fdf27b13495ca.json rename to .cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json index b94da0283d..2b7943c9f5 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-b87fe1434166fa5d7b0fdf27b13495ca.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-430013523eff20613409653bf327e76f.json @@ -1 +1 @@ -{"expireTime":9007200827958197000,"key":"transformer-remark-markdown-html-ast-6e9c5aea4f7ea7c85d806fb35a09a394-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-f47fd0b2c242daaaeea802a1c34eacee-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-63a23b09e546002dd44db88012dd9ea9.json b/.cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json similarity index 64% rename from .cache/caches/gatsby-transformer-remark/diskstore-63a23b09e546002dd44db88012dd9ea9.json rename to .cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json index 2f422d46aa..5884557993 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-63a23b09e546002dd44db88012dd9ea9.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-43009befa680af739fe61512801ffb17.json @@ -1 +1 @@ -{"expireTime":9007200828058191000,"key":"transformer-remark-markdown-ast-46d92e293407aa2f9b2f1b0b9fc86991-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-26a156bc9fc6a07eb205a6a3596b496d-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-d229c256337a024e6b0fdc8384b0e43f.json b/.cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json similarity index 64% rename from .cache/caches/gatsby-transformer-remark/diskstore-d229c256337a024e6b0fdc8384b0e43f.json rename to .cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json index 994a817613..5b4941f4a4 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-d229c256337a024e6b0fdc8384b0e43f.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-44654e1e137b1544f03ff6c9e63af3a5.json @@ -1 +1 @@ -{"expireTime":9007200827957780000,"key":"transformer-remark-markdown-ast-30a51869612bca077eda87f35f662bad-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-db2afa837fc242d71bff6d1c467bb7be-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json b/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json index a58a2006dc..786382ca1a 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-468b5bae8ef758f28811323986a026ca.json @@ -1 +1 @@ -{"expireTime":9007200827957779000,"key":"transformer-remark-markdown-ast-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"L7 地理空间可视化设计语言","position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":2,"column":1,"offset":15}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"L7 地理空间可视化设计语言","position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":15,"offset":14},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":2,"column":1,"offset":15}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-ee3ebf12b33fbdab54fcd9cf8c05164d.json b/.cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json similarity index 64% rename from .cache/caches/gatsby-transformer-remark/diskstore-ee3ebf12b33fbdab54fcd9cf8c05164d.json rename to .cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json index 356a54cf31..4f7b332a47 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-ee3ebf12b33fbdab54fcd9cf8c05164d.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-470d4aa805d5ae7d807cc6a4bb73260c.json @@ -1 +1 @@ -{"expireTime":9007200827958508000,"key":"transformer-remark-markdown-ast-a1d219db4ea61081778ff63395ff3e91-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-781c0a32942295837c2990e69f6d666a-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json b/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json index d4ee19c55b..946c49852c 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-479f7412bfaf2ad395f176418584631a.json @@ -1 +1 @@ -{"expireTime":9007200827957780000,"key":"transformer-remark-markdown-toc-d1a5a1e053cc8aaf5e0018566456ceec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-{\"heading\":null,\"maxDepth\":6,\"pathToSlugField\":\"fields.slug\"}-","val":"const Marker = new L7.Marker(option)
","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#option","title":null,"children":[],"data":{"hProperties":{"aria-label":"option permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101},"indent":[]},"data":{"id":"option","htmlAttributes":{"id":"option"},"hProperties":{"id":"option"}}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"color ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118},"indent":[]}},{"type":"html","value":"string
","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png","position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366},"indent":[]}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"element ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394},"indent":[]}},{"type":"html","value":"Dom|string
","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406},"indent":[]}},{"type":"text","value":" 自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"anchor ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459},"indent":[]}},{"type":"html","value":"string
","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467},"indent":[]}},{"type":"text","value":" 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"offset ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593},"indent":[]}},{"type":"html","value":"Array
","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600},"indent":[]}},{"type":"text","value":" 偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606},"indent":[]}},{"type":"linkReference","identifier":" 0, 0 ","label":" 0, 0 ","referenceType":"shortcut","children":[{"type":"text","value":" 0, 0 ","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613},"indent":[]}}],"position":{"start":{"line":14,"column":26,"offset":606},"end":{"line":14,"column":34,"offset":614},"indent":[]}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"setlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653},"indent":[]}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653},"indent":[]},"data":{"id":"setlnglat","htmlAttributes":{"id":"setlnglat"},"hProperties":{"id":"setlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#addto","title":null,"children":[],"data":{"hProperties":{"aria-label":"addto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679},"indent":[]},"data":{"id":"addto","htmlAttributes":{"id":"addto"},"hProperties":{"id":"addto"}}},{"type":"paragraph","children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#remove","title":null,"children":[],"data":{"hProperties":{"aria-label":"remove permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710},"indent":[]},"data":{"id":"remove","htmlAttributes":{"id":"remove"},"hProperties":{"id":"remove"}}},{"type":"paragraph","children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getelement","title":null,"children":[],"data":{"hProperties":{"aria-label":"getelement permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736},"indent":[]}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736},"indent":[]},"data":{"id":"getelement","htmlAttributes":{"id":"getelement"},"hProperties":{"id":"getelement"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773},"indent":[]}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773},"indent":[]},"data":{"id":"getlnglat","htmlAttributes":{"id":"getlnglat"},"hProperties":{"id":"getlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#togglepopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"togglepopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805},"indent":[]}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805},"indent":[]},"data":{"id":"togglepopup","htmlAttributes":{"id":"togglepopup"},"hProperties":{"id":"togglepopup"}}},{"type":"paragraph","children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836},"indent":[]}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836},"indent":[]},"data":{"id":"setpopup","htmlAttributes":{"id":"setpopup"},"hProperties":{"id":"setpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"getpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866},"indent":[]}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866},"indent":[]},"data":{"id":"getpopup","htmlAttributes":{"id":"getpopup"},"hProperties":{"id":"getpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#示例代码","title":null,"children":[],"data":{"hProperties":{"aria-label":"示例代码 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888},"indent":[]},"data":{"id":"示例代码","htmlAttributes":{"id":"示例代码"},"hProperties":{"id":"示例代码"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#默认marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"默认marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903},"indent":[]},"data":{"id":"默认marker","htmlAttributes":{"id":"默认marker"},"hProperties":{"id":"默认marker"}}},{"type":"paragraph","children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906},"indent":[]}},{"type":"html","value":"const marker = new L7.Marker({color:'blue'})
","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#自定义marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"自定义marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976},"indent":[]},"data":{"id":"自定义marker","htmlAttributes":{"id":"自定义marker"},"hProperties":{"id":"自定义marker"}}},{"type":"html","lang":"javascript","meta":null,"value":"var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
const Marker = new L7.Marker(option)
","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#option","title":null,"children":[],"data":{"hProperties":{"aria-label":"option permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101},"indent":[]},"data":{"id":"option","htmlAttributes":{"id":"option"},"hProperties":{"id":"option"}}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"color ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118},"indent":[]}},{"type":"html","value":"string
","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png","position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366},"indent":[]}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":278,"offset":380},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"element ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394},"indent":[]}},{"type":"html","value":"Dom|string
","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406},"indent":[]}},{"type":"text","value":" 自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":65,"offset":445},"indent":[]}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"anchor ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459},"indent":[]}},{"type":"html","value":"string
","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467},"indent":[]}},{"type":"text","value":" 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":135,"offset":580},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"offset ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593},"indent":[]}},{"type":"html","value":"Array
","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600},"indent":[]}},{"type":"text","value":" 偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606},"indent":[]}},{"type":"linkReference","identifier":" 0, 0 ","label":" 0, 0 ","referenceType":"shortcut","children":[{"type":"text","value":" 0, 0 ","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613},"indent":[]}}],"position":{"start":{"line":14,"column":26,"offset":606},"end":{"line":14,"column":34,"offset":614},"indent":[]}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637},"indent":[]},"data":{"id":"方法","htmlAttributes":{"id":"方法"},"hProperties":{"id":"方法"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"setlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653},"indent":[]}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653},"indent":[]},"data":{"id":"setlnglat","htmlAttributes":{"id":"setlnglat"},"hProperties":{"id":"setlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#addto","title":null,"children":[],"data":{"hProperties":{"aria-label":"addto permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679},"indent":[]},"data":{"id":"addto","htmlAttributes":{"id":"addto"},"hProperties":{"id":"addto"}}},{"type":"paragraph","children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#remove","title":null,"children":[],"data":{"hProperties":{"aria-label":"remove permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710},"indent":[]},"data":{"id":"remove","htmlAttributes":{"id":"remove"},"hProperties":{"id":"remove"}}},{"type":"paragraph","children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getelement","title":null,"children":[],"data":{"hProperties":{"aria-label":"getelement permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736},"indent":[]}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736},"indent":[]},"data":{"id":"getelement","htmlAttributes":{"id":"getelement"},"hProperties":{"id":"getelement"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getlnglat","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlnglat permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773},"indent":[]}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773},"indent":[]},"data":{"id":"getlnglat","htmlAttributes":{"id":"getlnglat"},"hProperties":{"id":"getlnglat"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#togglepopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"togglepopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805},"indent":[]}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805},"indent":[]},"data":{"id":"togglepopup","htmlAttributes":{"id":"togglepopup"},"hProperties":{"id":"togglepopup"}}},{"type":"paragraph","children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#setpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836},"indent":[]}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836},"indent":[]},"data":{"id":"setpopup","htmlAttributes":{"id":"setpopup"},"hProperties":{"id":"setpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#getpopup","title":null,"children":[],"data":{"hProperties":{"aria-label":"getpopup permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866},"indent":[]}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866},"indent":[]},"data":{"id":"getpopup","htmlAttributes":{"id":"getpopup"},"hProperties":{"id":"getpopup"}}},{"type":"paragraph","children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#示例代码","title":null,"children":[],"data":{"hProperties":{"aria-label":"示例代码 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888},"indent":[]},"data":{"id":"示例代码","htmlAttributes":{"id":"示例代码"},"hProperties":{"id":"示例代码"}}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#默认marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"默认marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903},"indent":[]},"data":{"id":"默认marker","htmlAttributes":{"id":"默认marker"},"hProperties":{"id":"默认marker"}}},{"type":"paragraph","children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906},"indent":[]}},{"type":"html","value":"const marker = new L7.Marker({color:'blue'})
","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#自定义marker","title":null,"children":[],"data":{"hProperties":{"aria-label":"自定义marker permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976},"indent":[]},"data":{"id":"自定义marker","htmlAttributes":{"id":"自定义marker"},"hProperties":{"id":"自定义marker"}}},{"type":"html","lang":"javascript","meta":null,"value":"var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
const Marker = new L7.Marker(option)
","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87}}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"option"},"children":[{"type":"element","tagName":"a","properties":{"href":"#option","aria-label":"option permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101}}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"color ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118}}},{"type":"raw","value":"string
","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127}}},{"type":"text","value":" ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130}}},{"type":"element","tagName":"img","properties":{"src":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png"},"children":[],"position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366}}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380}}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"element ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394}}},{"type":"raw","value":"Dom|string
","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406}}},{"type":"text","value":" 自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445}}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"anchor ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459}}},{"type":"raw","value":"string
","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467}}},{"type":"text","value":" 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580}}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"offset ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593}}},{"type":"raw","value":"Array
","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600}}},{"type":"text","value":" 偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606}}},{"type":"text","value":"[ 0, 0 ]","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613}}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629}}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637}}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setlnglat","aria-label":"setlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653}}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"addto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#addto","aria-label":"addto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679}}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"remove"},"children":[{"type":"element","tagName":"a","properties":{"href":"#remove","aria-label":"remove permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710}}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getelement"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getelement","aria-label":"getelement permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736}}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlnglat","aria-label":"getlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773}}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"togglepopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#togglepopup","aria-label":"togglepopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805}}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpopup","aria-label":"setpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836}}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getpopup","aria-label":"getpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866}}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"示例代码"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81","aria-label":"示例代码 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888}}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"默认marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E9%BB%98%E8%AE%A4marker","aria-label":"默认marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903}}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906}}},{"type":"raw","value":"const marker = new L7.Marker({color:'blue'})
","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959}}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"自定义marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E8%87%AA%E5%AE%9A%E4%B9%89marker","aria-label":"自定义marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976}}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976}}},{"type":"text","value":"\n"},{"type":"raw","value":"var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
const Marker = new L7.Marker(option)
","position":{"start":{"line":6,"column":13,"offset":49},"end":{"line":6,"column":51,"offset":87}}}],"position":{"start":{"line":6,"column":1,"offset":37},"end":{"line":6,"column":51,"offset":87}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"option"},"children":[{"type":"element","tagName":"a","properties":{"href":"#option","aria-label":"option permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"option","position":{"start":{"line":9,"column":6,"offset":95},"end":{"line":9,"column":12,"offset":101}}}],"position":{"start":{"line":9,"column":1,"offset":90},"end":{"line":9,"column":12,"offset":101}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"color ","position":{"start":{"line":11,"column":3,"offset":105},"end":{"line":11,"column":16,"offset":118}}},{"type":"raw","value":"string
","position":{"start":{"line":11,"column":16,"offset":118},"end":{"line":11,"column":25,"offset":127}}},{"type":"text","value":" ","position":{"start":{"line":11,"column":25,"offset":127},"end":{"line":11,"column":28,"offset":130}}},{"type":"element","tagName":"img","properties":{"src":"https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32","alt":"map-marker.png"},"children":[],"position":{"start":{"line":11,"column":28,"offset":130},"end":{"line":11,"column":264,"offset":366}}},{"type":"text","value":" 设置默认marker的颜色","position":{"start":{"line":11,"column":264,"offset":366},"end":{"line":11,"column":278,"offset":380}}}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":11,"column":278,"offset":380}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"element ","position":{"start":{"line":12,"column":3,"offset":383},"end":{"line":12,"column":14,"offset":394}}},{"type":"raw","value":"Dom|string
","position":{"start":{"line":12,"column":14,"offset":394},"end":{"line":12,"column":26,"offset":406}}},{"type":"text","value":" 自定义marker Dom节点,可以是dom实例,也可以是dom id","position":{"start":{"line":12,"column":26,"offset":406},"end":{"line":12,"column":65,"offset":445}}}],"position":{"start":{"line":12,"column":1,"offset":381},"end":{"line":12,"column":65,"offset":445}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"anchor ","position":{"start":{"line":13,"column":3,"offset":448},"end":{"line":13,"column":14,"offset":459}}},{"type":"raw","value":"string
","position":{"start":{"line":13,"column":14,"offset":459},"end":{"line":13,"column":22,"offset":467}}},{"type":"text","value":" 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right","position":{"start":{"line":13,"column":22,"offset":467},"end":{"line":13,"column":135,"offset":580}}}],"position":{"start":{"line":13,"column":1,"offset":446},"end":{"line":13,"column":135,"offset":580}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"offset ","position":{"start":{"line":14,"column":3,"offset":583},"end":{"line":14,"column":13,"offset":593}}},{"type":"raw","value":"Array
","position":{"start":{"line":14,"column":13,"offset":593},"end":{"line":14,"column":20,"offset":600}}},{"type":"text","value":" 偏移量 ","position":{"start":{"line":14,"column":20,"offset":600},"end":{"line":14,"column":26,"offset":606}}},{"type":"text","value":"[ 0, 0 ]","position":{"start":{"line":14,"column":27,"offset":607},"end":{"line":14,"column":33,"offset":613}}},{"type":"text","value":" 分别表示 X, Y 的偏移量","position":{"start":{"line":14,"column":34,"offset":614},"end":{"line":14,"column":49,"offset":629}}}],"position":{"start":{"line":14,"column":1,"offset":581},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"}],"position":{"start":{"line":11,"column":1,"offset":103},"end":{"line":14,"column":49,"offset":629}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"方法"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%96%B9%E6%B3%95","aria-label":"方法 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"方法","position":{"start":{"line":17,"column":4,"offset":635},"end":{"line":17,"column":6,"offset":637}}}],"position":{"start":{"line":17,"column":1,"offset":632},"end":{"line":17,"column":6,"offset":637}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setlnglat","aria-label":"setlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setLnglat","position":{"start":{"line":19,"column":6,"offset":644},"end":{"line":19,"column":15,"offset":653}}}],"position":{"start":{"line":19,"column":1,"offset":639},"end":{"line":19,"column":15,"offset":653}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置marker经纬度位置","position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}}],"position":{"start":{"line":20,"column":1,"offset":654},"end":{"line":20,"column":14,"offset":667}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"addto"},"children":[{"type":"element","tagName":"a","properties":{"href":"#addto","aria-label":"addto permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"addTo","position":{"start":{"line":22,"column":6,"offset":674},"end":{"line":22,"column":11,"offset":679}}}],"position":{"start":{"line":22,"column":1,"offset":669},"end":{"line":22,"column":11,"offset":679}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"将marker添加到地图Scene","position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}}],"position":{"start":{"line":23,"column":1,"offset":680},"end":{"line":23,"column":18,"offset":697}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"remove"},"children":[{"type":"element","tagName":"a","properties":{"href":"#remove","aria-label":"remove permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"remove","position":{"start":{"line":25,"column":6,"offset":704},"end":{"line":25,"column":12,"offset":710}}}],"position":{"start":{"line":25,"column":1,"offset":699},"end":{"line":25,"column":12,"offset":710}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除marker","position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}}],"position":{"start":{"line":26,"column":1,"offset":711},"end":{"line":26,"column":9,"offset":719}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getelement"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getelement","aria-label":"getelement permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getElement","position":{"start":{"line":28,"column":6,"offset":726},"end":{"line":28,"column":16,"offset":736}}}],"position":{"start":{"line":28,"column":1,"offset":721},"end":{"line":28,"column":16,"offset":736}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker dom Element","position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}}],"position":{"start":{"line":29,"column":1,"offset":737},"end":{"line":29,"column":21,"offset":757}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getlnglat"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlnglat","aria-label":"getlnglat permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLngLat","position":{"start":{"line":31,"column":6,"offset":764},"end":{"line":31,"column":15,"offset":773}}}],"position":{"start":{"line":31,"column":1,"offset":759},"end":{"line":31,"column":15,"offset":773}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker经纬度坐标","position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}}],"position":{"start":{"line":32,"column":1,"offset":774},"end":{"line":32,"column":14,"offset":787}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"togglepopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#togglepopup","aria-label":"togglepopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"togglePopup","position":{"start":{"line":34,"column":6,"offset":794},"end":{"line":34,"column":17,"offset":805}}}],"position":{"start":{"line":34,"column":1,"offset":789},"end":{"line":34,"column":17,"offset":805}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"开启或者关闭marker弹出框","position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}}],"position":{"start":{"line":35,"column":1,"offset":806},"end":{"line":35,"column":16,"offset":821}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"setpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpopup","aria-label":"setpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPopup","position":{"start":{"line":37,"column":6,"offset":828},"end":{"line":37,"column":14,"offset":836}}}],"position":{"start":{"line":37,"column":1,"offset":823},"end":{"line":37,"column":14,"offset":836}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"为marker设置popup","position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}}],"position":{"start":{"line":38,"column":1,"offset":837},"end":{"line":38,"column":15,"offset":851}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"getpopup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getpopup","aria-label":"getpopup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getPopup","position":{"start":{"line":40,"column":6,"offset":858},"end":{"line":40,"column":14,"offset":866}}}],"position":{"start":{"line":40,"column":1,"offset":853},"end":{"line":40,"column":14,"offset":866}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"获取marker弹出框","position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}}],"position":{"start":{"line":41,"column":1,"offset":867},"end":{"line":41,"column":12,"offset":878}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"示例代码"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81","aria-label":"示例代码 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"示例代码","position":{"start":{"line":44,"column":4,"offset":884},"end":{"line":44,"column":8,"offset":888}}}],"position":{"start":{"line":44,"column":1,"offset":881},"end":{"line":44,"column":8,"offset":888}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"默认marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E9%BB%98%E8%AE%A4marker","aria-label":"默认marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"默认Marker","position":{"start":{"line":46,"column":6,"offset":895},"end":{"line":46,"column":14,"offset":903}}}],"position":{"start":{"line":46,"column":1,"offset":890},"end":{"line":46,"column":14,"offset":903}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"**","position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":3,"offset":906}}},{"type":"raw","value":"const marker = new L7.Marker({color:'blue'})
","position":{"start":{"line":47,"column":9,"offset":912},"end":{"line":47,"column":56,"offset":959}}}],"position":{"start":{"line":47,"column":1,"offset":904},"end":{"line":47,"column":56,"offset":959}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"自定义marker"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E8%87%AA%E5%AE%9A%E4%B9%89marker","aria-label":"自定义marker permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"自定义Marker","position":{"start":{"line":50,"column":6,"offset":967},"end":{"line":50,"column":15,"offset":976}}}],"position":{"start":{"line":50,"column":1,"offset":962},"end":{"line":50,"column":15,"offset":976}}},{"type":"text","value":"\n"},{"type":"raw","value":"var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
const popup = new L7.Popup(option);\n
popup.setLnglat([112, 32]);\n
popup.addTo(scene);\n
var html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
popup.setText('hello world');\n
popup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
const popup = new L7.Popup(option);\n
popup.setLnglat([112, 32]);\n
popup.addTo(scene);\n
var html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
popup.setText('hello world');\n
popup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
目前L7支持的数据格式有GeoJson,CSV,JSon Image
\nGeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。
\n\nGeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。
\n
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
turfjs: 地理数据计算,处理,统计,分析的Javascript 库
\nhttp://geojson.io/ 可以在线查看,绘制,修改GeoJSON数据
\nhttps://mapshaper.org/ 可以查看较大的geojson,还能够简化GeoJSON数据
"} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-b1a6eb4a5fb92e03f562537f31f11c68-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"目前L7支持的数据格式有GeoJson,CSV,JSon Image
\nGeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。
\n\nGeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。
\n
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
turfjs: 地理数据计算,处理,统计,分析的Javascript 库
\nhttp://geojson.io/ 可以在线查看,绘制,修改GeoJSON数据
\nhttps://mapshaper.org/ 可以查看较大的geojson,还能够简化GeoJSON数据
"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json b/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json index af5e8eb744..95f777eea5 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-6195db1b342fb1235a247e18694e1cc8.json @@ -1 +1 @@ -{"expireTime":9007200827957780000,"key":"transformer-remark-markdown-ast-4e775806f930bb554f175748236303d7-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":1,"children":[{"type":"link","url":"#control","title":null,"children":[],"data":{"hProperties":{"aria-label":"control permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"control","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":10,"offset":9},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":10,"offset":9},"indent":[]},"data":{"id":"control","htmlAttributes":{"id":"control"},"hProperties":{"id":"control"}}},{"type":"paragraph","children":[{"type":"text","value":"地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺","position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":11},"end":{"line":3,"column":43,"offset":53},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#构造函数","title":null,"children":[],"data":{"hProperties":{"aria-label":"构造函数 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":59},"end":{"line":6,"column":8,"offset":63},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":56},"end":{"line":6,"column":8,"offset":63},"indent":[]},"data":{"id":"构造函数","htmlAttributes":{"id":"构造函数"},"hProperties":{"id":"构造函数"}}},{"type":"html","lang":"javascript","meta":null,"value":"const baseControl = new L7.Control.Base(option);\n
string
","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165},"indent":[]}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177},"indent":[]}},{"type":"html","value":"bottomright, topright, bottomleft, topleft
","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#scene-内置地图组件","title":null,"children":[],"data":{"hProperties":{"aria-label":"scene 内置地图组件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241},"indent":[]},"data":{"id":"scene-内置地图组件","htmlAttributes":{"id":"scene-内置地图组件"},"hProperties":{"id":"scene-内置地图组件"}}},{"type":"paragraph","children":[{"type":"text","value":"zoom 地图放大缩小 默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259},"indent":[]}},{"type":"html","value":"scene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
new L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
new L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
new L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
var overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
control.addTo(scene);\n
control.setPosition('bottomright');\n
control.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
const baseControl = new L7.Control.Base(option);\n
string
","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165},"indent":[]}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177},"indent":[]}},{"type":"html","value":"bottomright, topright, bottomleft, topleft
","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221},"indent":[]}},{"type":"heading","depth":4,"children":[{"type":"link","url":"#scene-内置地图组件","title":null,"children":[],"data":{"hProperties":{"aria-label":"scene 内置地图组件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241},"indent":[]},"data":{"id":"scene-内置地图组件","htmlAttributes":{"id":"scene-内置地图组件"},"hProperties":{"id":"scene-内置地图组件"}}},{"type":"paragraph","children":[{"type":"text","value":"zoom 地图放大缩小 默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259},"indent":[]}},{"type":"html","value":"scene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
new L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
new L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
new L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
var overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
control.addTo(scene);\n
control.setPosition('bottomright');\n
control.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15},"indent":[]}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"import {Scene} from '@l7/scene';\nconst scene =new L7.Scene({\n id:'map'\n mapStyle:'dark',\n center:[ 110.770672, 34.159869 ],\n pitch:45\n})
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1402},"end":{"line":105,"column":91,"offset":1452},"indent":[]}},{"type":"html","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1541},"end":{"line":105,"column":202,"offset":1563},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1563},"end":{"line":105,"column":203,"offset":1564},"indent":[]}},{"type":"html","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2333},"end":{"line":170,"column":12,"offset":2341},"indent":[]}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2341},"end":{"line":170,"column":28,"offset":2357},"indent":[]}}],"position":{"start":{"line":170,"column":1,"offset":2330},"end":{"line":170,"column":28,"offset":2357},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setzoomandcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"setzoomandcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2364},"end":{"line":173,"column":21,"offset":2380},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":2360},"end":{"line":173,"column":21,"offset":2380},"indent":[]},"data":{"id":"setzoomandcenter","htmlAttributes":{"id":"setzoomandcenter"},"hProperties":{"id":"setzoomandcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2381},"end":{"line":174,"column":10,"offset":2390},"indent":[]}}],"position":{"start":{"line":174,"column":1,"offset":2381},"end":{"line":174,"column":10,"offset":2390},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2591},"end":{"line":188,"column":15,"offset":2601},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2601},"end":{"line":188,"column":26,"offset":2612},"indent":[]}}],"position":{"start":{"line":188,"column":1,"offset":2587},"end":{"line":188,"column":26,"offset":2612},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoomin","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoomin permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2618},"end":{"line":190,"column":11,"offset":2624},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2614},"end":{"line":190,"column":11,"offset":2624},"indent":[]},"data":{"id":"zoomin","htmlAttributes":{"id":"zoomin"},"hProperties":{"id":"zoomin"}}},{"type":"paragraph","children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2625},"end":{"line":191,"column":7,"offset":2631},"indent":[]}}],"position":{"start":{"line":191,"column":1,"offset":2625},"end":{"line":191,"column":7,"offset":2631},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2783},"end":{"line":208,"column":12,"offset":2791},"indent":[]}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2791},"end":{"line":208,"column":27,"offset":2806},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2780},"end":{"line":208,"column":27,"offset":2806},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#panby","title":null,"children":[],"data":{"hProperties":{"aria-label":"panby permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2812},"end":{"line":210,"column":10,"offset":2817},"indent":[]}}],"position":{"start":{"line":210,"column":1,"offset":2808},"end":{"line":210,"column":10,"offset":2817},"indent":[]},"data":{"id":"panby","htmlAttributes":{"id":"panby"},"hProperties":{"id":"panby"}}},{"type":"paragraph","children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2818},"end":{"line":211,"column":19,"offset":2836},"indent":[]}}],"position":{"start":{"line":211,"column":1,"offset":2818},"end":{"line":211,"column":19,"offset":2836},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2881},"end":{"line":215,"column":13,"offset":2884},"indent":[]}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2884},"end":{"line":215,"column":38,"offset":2909},"indent":[]}},{"type":"html","value":"y
","position":{"start":{"line":215,"column":50,"offset":2921},"end":{"line":215,"column":53,"offset":2924},"indent":[]}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2924},"end":{"line":215,"column":79,"offset":2950},"indent":[]}}],"position":{"start":{"line":215,"column":1,"offset":2872},"end":{"line":215,"column":79,"offset":2950},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setpitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2957},"end":{"line":218,"column":13,"offset":2965},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2953},"end":{"line":218,"column":13,"offset":2965},"indent":[]},"data":{"id":"setpitch","htmlAttributes":{"id":"setpitch"},"hProperties":{"id":"setpitch"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2966},"end":{"line":219,"column":9,"offset":2974},"indent":[]}}],"position":{"start":{"line":219,"column":1,"offset":2966},"end":{"line":219,"column":9,"offset":2974},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3029},"end":{"line":224,"column":21,"offset":3036},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3036},"end":{"line":224,"column":31,"offset":3046},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":3016},"end":{"line":224,"column":31,"offset":3046},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#","title":null,"children":[],"data":{"hProperties":{"aria-label":" permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":226,"column":1,"offset":3048},"end":{"line":226,"column":5,"offset":3052},"indent":[]},"data":{"id":"","htmlAttributes":{"id":""},"hProperties":{"id":""}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setstatus","title":null,"children":[],"data":{"hProperties":{"aria-label":"setstatus permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3058},"end":{"line":228,"column":14,"offset":3067},"indent":[]}}],"position":{"start":{"line":228,"column":1,"offset":3054},"end":{"line":228,"column":14,"offset":3067},"indent":[]},"data":{"id":"setstatus","htmlAttributes":{"id":"setstatus"},"hProperties":{"id":"setstatus"}}},{"type":"paragraph","children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3068},"end":{"line":229,"column":100,"offset":3167},"indent":[]}}],"position":{"start":{"line":229,"column":1,"offset":3068},"end":{"line":229,"column":100,"offset":3167},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3391},"end":{"line":243,"column":37,"offset":3399},"indent":[]}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3399},"end":{"line":243,"column":53,"offset":3415},"indent":[]}},{"type":"linkReference","identifier":"minlng,minlat,maxlng,maxlat","label":"minlng,minlat,maxlng,maxlat","referenceType":"shortcut","children":[{"type":"text","value":"minlng,minlat,maxlng,maxlat","position":{"start":{"line":243,"column":54,"offset":3416},"end":{"line":243,"column":81,"offset":3443},"indent":[]}}],"position":{"start":{"line":243,"column":53,"offset":3415},"end":{"line":243,"column":82,"offset":3444},"indent":[]}}],"position":{"start":{"line":243,"column":1,"offset":3363},"end":{"line":243,"column":82,"offset":3444},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3578},"end":{"line":258,"column":16,"offset":3585},"indent":[]}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3585},"end":{"line":258,"column":25,"offset":3594},"indent":[]}}],"position":{"start":{"line":258,"column":1,"offset":3570},"end":{"line":258,"column":25,"offset":3594},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlayers-1","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlayers 1 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3600},"end":{"line":260,"column":14,"offset":3609},"indent":[]}}],"position":{"start":{"line":260,"column":1,"offset":3596},"end":{"line":260,"column":14,"offset":3609},"indent":[]},"data":{"id":"getlayers-1","htmlAttributes":{"id":"getlayers-1"},"hProperties":{"id":"getlayers-1"}}},{"type":"paragraph","children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3610},"end":{"line":261,"column":12,"offset":3621},"indent":[]}}],"position":{"start":{"line":261,"column":1,"offset":3610},"end":{"line":261,"column":12,"offset":3621},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3714},"end":{"line":276,"column":12,"offset":3725},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3725},"end":{"line":276,"column":26,"offset":3739},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3745},"end":{"line":276,"column":40,"offset":3753},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3753},"end":{"line":276,"column":60,"offset":3773},"indent":[]}}],"position":{"start":{"line":276,"column":1,"offset":3714},"end":{"line":276,"column":60,"offset":3773},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#off","title":null,"children":[],"data":{"hProperties":{"aria-label":"off permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3780},"end":{"line":279,"column":8,"offset":3783},"indent":[]}}],"position":{"start":{"line":279,"column":1,"offset":3776},"end":{"line":279,"column":8,"offset":3783},"indent":[]},"data":{"id":"off","htmlAttributes":{"id":"off"},"hProperties":{"id":"off"}}},{"type":"paragraph","children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3784},"end":{"line":280,"column":7,"offset":3790},"indent":[]}},{"type":"html","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3796},"end":{"line":280,"column":24,"offset":3807},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3807},"end":{"line":280,"column":38,"offset":3821},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3827},"end":{"line":280,"column":52,"offset":3835},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3835},"end":{"line":280,"column":72,"offset":3855},"indent":[]}}],"position":{"start":{"line":280,"column":1,"offset":3784},"end":{"line":280,"column":72,"offset":3855},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#地图事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"地图事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3862},"end":{"line":283,"column":9,"offset":3866},"indent":[]}}],"position":{"start":{"line":283,"column":1,"offset":3858},"end":{"line":283,"column":9,"offset":3866},"indent":[]},"data":{"id":"地图事件","htmlAttributes":{"id":"地图事件"},"hProperties":{"id":"地图事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15},"indent":[]}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453},"indent":[]}},{"type":"html","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565},"indent":[]}},{"type":"html","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342},"indent":[]}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358},"indent":[]}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setzoomandcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"setzoomandcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381},"indent":[]},"data":{"id":"setzoomandcenter","htmlAttributes":{"id":"setzoomandcenter"},"hProperties":{"id":"setzoomandcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613},"indent":[]}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoomin","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoomin permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625},"indent":[]},"data":{"id":"zoomin","htmlAttributes":{"id":"zoomin"},"hProperties":{"id":"zoomin"}}},{"type":"paragraph","children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792},"indent":[]}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#panby","title":null,"children":[],"data":{"hProperties":{"aria-label":"panby permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818},"indent":[]}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818},"indent":[]},"data":{"id":"panby","htmlAttributes":{"id":"panby"},"hProperties":{"id":"panby"}}},{"type":"paragraph","children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885},"indent":[]}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910},"indent":[]}},{"type":"html","value":"y
","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925},"indent":[]}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951},"indent":[]}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setpitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966},"indent":[]},"data":{"id":"setpitch","htmlAttributes":{"id":"setpitch"},"hProperties":{"id":"setpitch"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#","title":null,"children":[],"data":{"hProperties":{"aria-label":" permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053},"indent":[]},"data":{"id":"","htmlAttributes":{"id":""},"hProperties":{"id":""}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setstatus","title":null,"children":[],"data":{"hProperties":{"aria-label":"setstatus permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068},"indent":[]}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068},"indent":[]},"data":{"id":"setstatus","htmlAttributes":{"id":"setstatus"},"hProperties":{"id":"setstatus"}}},{"type":"paragraph","children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400},"indent":[]}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416},"indent":[]}},{"type":"linkReference","identifier":"minlng,minlat,maxlng,maxlat","label":"minlng,minlat,maxlng,maxlat","referenceType":"shortcut","children":[{"type":"text","value":"minlng,minlat,maxlng,maxlat","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444},"indent":[]}}],"position":{"start":{"line":243,"column":53,"offset":3416},"end":{"line":243,"column":82,"offset":3445},"indent":[]}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586},"indent":[]}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595},"indent":[]}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlayers-1","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlayers 1 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610},"indent":[]}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610},"indent":[]},"data":{"id":"getlayers-1","htmlAttributes":{"id":"getlayers-1"},"hProperties":{"id":"getlayers-1"}}},{"type":"paragraph","children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774},"indent":[]}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#off","title":null,"children":[],"data":{"hProperties":{"aria-label":"off permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784},"indent":[]}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784},"indent":[]},"data":{"id":"off","htmlAttributes":{"id":"off"},"hProperties":{"id":"off"}}},{"type":"paragraph","children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791},"indent":[]}},{"type":"html","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856},"indent":[]}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#地图事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"地图事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867},"indent":[]}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867},"indent":[]},"data":{"id":"地图事件","htmlAttributes":{"id":"地图事件"},"hProperties":{"id":"地图事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15},"indent":[]}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453},"indent":[]}},{"type":"html","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565},"indent":[]}},{"type":"html","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342},"indent":[]}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358},"indent":[]}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setzoomandcenter","title":null,"children":[],"data":{"hProperties":{"aria-label":"setzoomandcenter permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381},"indent":[]},"data":{"id":"setzoomandcenter","htmlAttributes":{"id":"setzoomandcenter"},"hProperties":{"id":"setzoomandcenter"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613},"indent":[]}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#zoomin","title":null,"children":[],"data":{"hProperties":{"aria-label":"zoomin permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625},"indent":[]}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625},"indent":[]},"data":{"id":"zoomin","htmlAttributes":{"id":"zoomin"},"hProperties":{"id":"zoomin"}}},{"type":"paragraph","children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792},"indent":[]}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807},"indent":[]}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#panby","title":null,"children":[],"data":{"hProperties":{"aria-label":"panby permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818},"indent":[]}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818},"indent":[]},"data":{"id":"panby","htmlAttributes":{"id":"panby"},"hProperties":{"id":"panby"}}},{"type":"paragraph","children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885},"indent":[]}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910},"indent":[]}},{"type":"html","value":"y
","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925},"indent":[]}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951},"indent":[]}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setpitch","title":null,"children":[],"data":{"hProperties":{"aria-label":"setpitch permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966},"indent":[]}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966},"indent":[]},"data":{"id":"setpitch","htmlAttributes":{"id":"setpitch"},"hProperties":{"id":"setpitch"}}},{"type":"paragraph","children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037},"indent":[]}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047},"indent":[]}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#","title":null,"children":[],"data":{"hProperties":{"aria-label":" permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053},"indent":[]},"data":{"id":"","htmlAttributes":{"id":""},"hProperties":{"id":""}}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#setstatus","title":null,"children":[],"data":{"hProperties":{"aria-label":"setstatus permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068},"indent":[]}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068},"indent":[]},"data":{"id":"setstatus","htmlAttributes":{"id":"setstatus"},"hProperties":{"id":"setstatus"}}},{"type":"paragraph","children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400},"indent":[]}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416},"indent":[]}},{"type":"linkReference","identifier":"minlng,minlat,maxlng,maxlat","label":"minlng,minlat,maxlng,maxlat","referenceType":"shortcut","children":[{"type":"text","value":"minlng,minlat,maxlng,maxlat","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444},"indent":[]}}],"position":{"start":{"line":243,"column":53,"offset":3416},"end":{"line":243,"column":82,"offset":3445},"indent":[]}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586},"indent":[]}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595},"indent":[]}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#getlayers-1","title":null,"children":[],"data":{"hProperties":{"aria-label":"getlayers 1 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610},"indent":[]}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610},"indent":[]},"data":{"id":"getlayers-1","htmlAttributes":{"id":"getlayers-1"},"hProperties":{"id":"getlayers-1"}}},{"type":"paragraph","children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774},"indent":[]}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#off","title":null,"children":[],"data":{"hProperties":{"aria-label":"off permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784},"indent":[]}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784},"indent":[]},"data":{"id":"off","htmlAttributes":{"id":"off"},"hProperties":{"id":"off"}}},{"type":"paragraph","children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791},"indent":[]}},{"type":"html","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808},"indent":[]}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822},"indent":[]}},{"type":"html","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836},"indent":[]}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856},"indent":[]}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#地图事件","title":null,"children":[],"data":{"hProperties":{"aria-label":"地图事件 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":""}]}},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867},"indent":[]}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867},"indent":[]},"data":{"id":"地图事件","htmlAttributes":{"id":"地图事件"},"hProperties":{"id":"地图事件"}}},{"type":"html","lang":"javascript","meta":null,"value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
L7 地理空间可视化设计语言
"} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-57531815410aa78dc10e42270cb201dd-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":"L7 地理空间可视化设计语言
"} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json b/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json index 51c924c93a..a2a95b244c 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-994b78daf72919990af1bf2269cd4372.json @@ -1 +1 @@ -{"expireTime":9007200827958528000,"key":"transformer-remark-markdown-html-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-e0eda26454f7aaeda47989e111060318-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9cf731425f928d78c08a41fa53dbea26.json b/.cache/caches/gatsby-transformer-remark/diskstore-9cf731425f928d78c08a41fa53dbea26.json deleted file mode 100644 index 8448e9c615..0000000000 --- a/.cache/caches/gatsby-transformer-remark/diskstore-9cf731425f928d78c08a41fa53dbea26.json +++ /dev/null @@ -1 +0,0 @@ -{"expireTime":9007200828184475000,"key":"transformer-remark-markdown-html-6e9c5aea4f7ea7c85d806fb35a09a394-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json b/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json new file mode 100644 index 0000000000..60812259cd --- /dev/null +++ b/.cache/caches/gatsby-transformer-remark/diskstore-9d35c059fe2ed0d16646249d187e25ed.json @@ -0,0 +1 @@ +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-html-ast-440de581fed1a931f1963c1d957506b6-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json b/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json new file mode 100644 index 0000000000..e0852d1a7a --- /dev/null +++ b/.cache/caches/gatsby-transformer-remark/diskstore-9fdf0b53e01f30bc74c780152532eac3.json @@ -0,0 +1 @@ +{"expireTime":9007200828444202000,"key":"transformer-remark-markdown-html-db2afa837fc242d71bff6d1c467bb7be-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":""} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json b/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json new file mode 100644 index 0000000000..65ae89af42 --- /dev/null +++ b/.cache/caches/gatsby-transformer-remark/diskstore-a4bbf303ee2db11d74c46460cc08a6d5.json @@ -0,0 +1 @@ +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-c33b8eb118a2549971f1a2859bd8a790-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json b/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json new file mode 100644 index 0000000000..7d9849073a --- /dev/null +++ b/.cache/caches/gatsby-transformer-remark/diskstore-a58f599cdea215bb9e3b4f7ab5a7470e.json @@ -0,0 +1 @@ +{"expireTime":9007200828443366000,"key":"transformer-remark-markdown-ast-8b41ef08d386d48da6524752db1281ec-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":1,"offset":0}}}} \ No newline at end of file diff --git a/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json b/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json index 661498f2fd..1f5b76225f 100644 --- a/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json +++ b/.cache/caches/gatsby-transformer-remark/diskstore-a7725b15bd64a40f9d4d5eb35340b314.json @@ -1 +1 @@ -{"expireTime":9007200827957780000,"key":"transformer-remark-markdown-html-ast-a4fdd704fadc6272a50f61c3eb36ad4b-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"h1","properties":{"id":"popup"},"children":[{"type":"element","tagName":"a","properties":{"href":"#popup","aria-label":"popup permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"popup","position":{"start":{"line":1,"column":3,"offset":2},"end":{"line":1,"column":8,"offset":7}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":8,"offset":7}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图标注信息窗口,用于展示地图要素的属性信息","position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31}}}],"position":{"start":{"line":3,"column":1,"offset":9},"end":{"line":3,"column":23,"offset":31}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"构造函数"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0","aria-label":"构造函数 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"构造函数","position":{"start":{"line":6,"column":4,"offset":37},"end":{"line":6,"column":8,"offset":41}}}],"position":{"start":{"line":6,"column":1,"offset":34},"end":{"line":6,"column":8,"offset":41}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Popup","position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47}}}],"position":{"start":{"line":7,"column":1,"offset":42},"end":{"line":7,"column":6,"offset":47}}},{"type":"text","value":"\n"},{"type":"raw","value":"const popup = new L7.Popup(option);\n
popup.setLnglat([112, 32]);\n
popup.addTo(scene);\n
var html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
popup.setText('hello world');\n
popup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
const popup = new L7.Popup(option);\n
popup.setLnglat([112, 32]);\n
popup.addTo(scene);\n
var html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
popup.setText('hello world');\n
popup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15}}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39}}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}},{"type":"text","value":"\n"},{"type":"raw","value":"import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453}}},{"type":"raw","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564}}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565}}},{"type":"raw","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342}}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358}}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setzoomandcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setzoomandcenter","aria-label":"setzoomandcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381}}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602}}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613}}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoomin"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoomin","aria-label":"zoomin permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625}}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792}}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807}}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"panby"},"children":[{"type":"element","tagName":"a","properties":{"href":"#panby","aria-label":"panby permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818}}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885}}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910}}},{"type":"raw","value":"y
","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925}}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951}}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setpitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpitch","aria-label":"setpitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966}}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037}}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047}}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":""},"children":[{"type":"element","tagName":"a","properties":{"href":"#","aria-label":" permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setstatus"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setstatus","aria-label":"setstatus permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068}}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400}}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416}}},{"type":"text","value":"[minlng,minlat,maxlng,maxlat]","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444}}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586}}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595}}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getlayers-1"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlayers-1","aria-label":"getlayers 1 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610}}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740}}},{"type":"raw","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774}}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"off"},"children":[{"type":"element","tagName":"a","properties":{"href":"#off","aria-label":"off permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784}}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791}}},{"type":"raw","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822}}},{"type":"raw","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856}}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"地图事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%B0%E5%9B%BE%E4%BA%8B%E4%BB%B6","aria-label":"地图事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867}}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
Scene
","position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":9,"offset":15}}},{"type":"text","value":"基础的地图类,提供地图创建,图层创建,管理等功能","position":{"start":{"line":3,"column":9,"offset":15},"end":{"line":3,"column":33,"offset":39}}}],"position":{"start":{"line":3,"column":1,"offset":7},"end":{"line":3,"column":33,"offset":39}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"示例代码","position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}}],"position":{"start":{"line":5,"column":1,"offset":41},"end":{"line":5,"column":5,"offset":45}}},{"type":"text","value":"\n"},{"type":"raw","value":"import { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
scene.map;\n
"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
","position":{"start":{"line":105,"column":41,"offset":1403},"end":{"line":105,"column":91,"offset":1453}}},{"type":"raw","value":""amap://styles/grey"
","position":{"start":{"line":105,"column":180,"offset":1542},"end":{"line":105,"column":202,"offset":1564}}},{"type":"text","value":"。","position":{"start":{"line":105,"column":202,"offset":1564},"end":{"line":105,"column":203,"offset":1565}}},{"type":"raw","value":"scene.getZoom();\n
scene.getLayers();\n
scene.getCenter();\n
scene.getSize();\n
scene.getPitch();\n
scene.setCenter([lng, lat]);\n
center
","position":{"start":{"line":170,"column":4,"offset":2334},"end":{"line":170,"column":12,"offset":2342}}},{"type":"text","value":" {LngLat} 地图中心点","position":{"start":{"line":170,"column":12,"offset":2342},"end":{"line":170,"column":28,"offset":2358}}}],"position":{"start":{"line":170,"column":1,"offset":2331},"end":{"line":170,"column":28,"offset":2358}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setzoomandcenter"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setzoomandcenter","aria-label":"setzoomandcenter permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setZoomAndCenter","position":{"start":{"line":173,"column":5,"offset":2365},"end":{"line":173,"column":21,"offset":2381}}}],"position":{"start":{"line":173,"column":1,"offset":2361},"end":{"line":173,"column":21,"offset":2381}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图等级和中心","position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}}],"position":{"start":{"line":174,"column":1,"offset":2382},"end":{"line":174,"column":10,"offset":2391}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setZoomAndCenter(zoom, center);\n
scene.setRotation(rotation);\n
rotation
","position":{"start":{"line":188,"column":5,"offset":2592},"end":{"line":188,"column":15,"offset":2602}}},{"type":"text","value":" {number}","position":{"start":{"line":188,"column":15,"offset":2602},"end":{"line":188,"column":26,"offset":2613}}}],"position":{"start":{"line":188,"column":1,"offset":2588},"end":{"line":188,"column":26,"offset":2613}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"zoomin"},"children":[{"type":"element","tagName":"a","properties":{"href":"#zoomin","aria-label":"zoomin permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"zoomIn","position":{"start":{"line":190,"column":5,"offset":2619},"end":{"line":190,"column":11,"offset":2625}}}],"position":{"start":{"line":190,"column":1,"offset":2615},"end":{"line":190,"column":11,"offset":2625}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"地图放大一级","position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}}],"position":{"start":{"line":191,"column":1,"offset":2626},"end":{"line":191,"column":7,"offset":2632}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.zoomIn();\n
scene.ZoomOUt();\n
scene.panTo(LngLat);\n
center
","position":{"start":{"line":208,"column":4,"offset":2784},"end":{"line":208,"column":12,"offset":2792}}},{"type":"text","value":" LngLat 中心位置坐标","position":{"start":{"line":208,"column":12,"offset":2792},"end":{"line":208,"column":27,"offset":2807}}}],"position":{"start":{"line":208,"column":1,"offset":2781},"end":{"line":208,"column":27,"offset":2807}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"panby"},"children":[{"type":"element","tagName":"a","properties":{"href":"#panby","aria-label":"panby permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"panBy","position":{"start":{"line":210,"column":5,"offset":2813},"end":{"line":210,"column":10,"offset":2818}}}],"position":{"start":{"line":210,"column":1,"offset":2809},"end":{"line":210,"column":10,"offset":2818}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"以像素为单位沿X方向和Y方向移动地图","position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}}],"position":{"start":{"line":211,"column":1,"offset":2819},"end":{"line":211,"column":19,"offset":2837}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.panBy(x, y);\n
x
","position":{"start":{"line":215,"column":10,"offset":2882},"end":{"line":215,"column":13,"offset":2885}}},{"type":"text","value":" {number} 水平方向移动像素 向右为正方向","position":{"start":{"line":215,"column":13,"offset":2885},"end":{"line":215,"column":38,"offset":2910}}},{"type":"raw","value":"y
","position":{"start":{"line":215,"column":50,"offset":2922},"end":{"line":215,"column":53,"offset":2925}}},{"type":"text","value":" {number} 垂直方向移动像素 向下为正方向","position":{"start":{"line":215,"column":53,"offset":2925},"end":{"line":215,"column":79,"offset":2951}}}],"position":{"start":{"line":215,"column":1,"offset":2873},"end":{"line":215,"column":79,"offset":2951}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setpitch"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setpitch","aria-label":"setpitch permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setPitch","position":{"start":{"line":218,"column":5,"offset":2958},"end":{"line":218,"column":13,"offset":2966}}}],"position":{"start":{"line":218,"column":1,"offset":2954},"end":{"line":218,"column":13,"offset":2966}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置地图仰俯角度","position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}}],"position":{"start":{"line":219,"column":1,"offset":2967},"end":{"line":219,"column":9,"offset":2975}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setPitch(pitch);\n
pitch
","position":{"start":{"line":224,"column":14,"offset":3030},"end":{"line":224,"column":21,"offset":3037}}},{"type":"text","value":" {number}","position":{"start":{"line":224,"column":21,"offset":3037},"end":{"line":224,"column":31,"offset":3047}}}],"position":{"start":{"line":224,"column":1,"offset":3017},"end":{"line":224,"column":31,"offset":3047}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":""},"children":[{"type":"element","tagName":"a","properties":{"href":"#","aria-label":" permalink","class":"anchor"},"children":[{"type":"raw","value":""}]}],"position":{"start":{"line":226,"column":1,"offset":3049},"end":{"line":226,"column":5,"offset":3053}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"setstatus"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setstatus","aria-label":"setstatus permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"setStatus","position":{"start":{"line":228,"column":5,"offset":3059},"end":{"line":228,"column":14,"offset":3068}}}],"position":{"start":{"line":228,"column":1,"offset":3055},"end":{"line":228,"column":14,"offset":3068}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等 ","position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}}],"position":{"start":{"line":229,"column":1,"offset":3069},"end":{"line":229,"column":100,"offset":3168}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
extent
","position":{"start":{"line":243,"column":29,"offset":3392},"end":{"line":243,"column":37,"offset":3400}}},{"type":"text","value":" { array} 经纬度范围 ","position":{"start":{"line":243,"column":37,"offset":3400},"end":{"line":243,"column":53,"offset":3416}}},{"type":"text","value":"[minlng,minlat,maxlng,maxlat]","position":{"start":{"line":243,"column":54,"offset":3417},"end":{"line":243,"column":81,"offset":3444}}}],"position":{"start":{"line":243,"column":1,"offset":3364},"end":{"line":243,"column":82,"offset":3445}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.fitBounds([112, 32, 114, 35]);\n
scene.removeLayer(layer);\n
layer
","position":{"start":{"line":258,"column":9,"offset":3579},"end":{"line":258,"column":16,"offset":3586}}},{"type":"text","value":" {Layer}","position":{"start":{"line":258,"column":16,"offset":3586},"end":{"line":258,"column":25,"offset":3595}}}],"position":{"start":{"line":258,"column":1,"offset":3571},"end":{"line":258,"column":25,"offset":3595}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"getlayers-1"},"children":[{"type":"element","tagName":"a","properties":{"href":"#getlayers-1","aria-label":"getlayers 1 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"getLayers","position":{"start":{"line":260,"column":5,"offset":3601},"end":{"line":260,"column":14,"offset":3610}}}],"position":{"start":{"line":260,"column":1,"offset":3597},"end":{"line":260,"column":14,"offset":3610}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":" 获取所有的layer","position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}}],"position":{"start":{"line":261,"column":1,"offset":3611},"end":{"line":261,"column":12,"offset":3622}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.getLayers();\n
eventName
","position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":12,"offset":3726}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":276,"column":12,"offset":3726},"end":{"line":276,"column":26,"offset":3740}}},{"type":"raw","value":"hander
","position":{"start":{"line":276,"column":32,"offset":3746},"end":{"line":276,"column":40,"offset":3754}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":276,"column":40,"offset":3754},"end":{"line":276,"column":60,"offset":3774}}}],"position":{"start":{"line":276,"column":1,"offset":3715},"end":{"line":276,"column":60,"offset":3774}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"off"},"children":[{"type":"element","tagName":"a","properties":{"href":"#off","aria-label":"off permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"off","position":{"start":{"line":279,"column":5,"offset":3781},"end":{"line":279,"column":8,"offset":3784}}}],"position":{"start":{"line":279,"column":1,"offset":3777},"end":{"line":279,"column":8,"offset":3784}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"移除事件监听","position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":7,"offset":3791}}},{"type":"raw","value":"eventName
","position":{"start":{"line":280,"column":13,"offset":3797},"end":{"line":280,"column":24,"offset":3808}}},{"type":"text","value":" {string} 事件名","position":{"start":{"line":280,"column":24,"offset":3808},"end":{"line":280,"column":38,"offset":3822}}},{"type":"raw","value":"hander
","position":{"start":{"line":280,"column":44,"offset":3828},"end":{"line":280,"column":52,"offset":3836}}},{"type":"text","value":" {function } 事件回调函数","position":{"start":{"line":280,"column":52,"offset":3836},"end":{"line":280,"column":72,"offset":3856}}}],"position":{"start":{"line":280,"column":1,"offset":3785},"end":{"line":280,"column":72,"offset":3856}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"地图事件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%B0%E5%9B%BE%E4%BA%8B%E4%BB%B6","aria-label":"地图事件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"地图事件","position":{"start":{"line":283,"column":5,"offset":3863},"end":{"line":283,"column":9,"offset":3867}}}],"position":{"start":{"line":283,"column":1,"offset":3859},"end":{"line":283,"column":9,"offset":3867}}},{"type":"text","value":"\n"},{"type":"raw","value":"scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
const baseControl = new L7.Control.Base(option);\n
string
","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165}}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177}}},{"type":"raw","value":"bottomright, topright, bottomleft, topleft
","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221}}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"scene-内置地图组件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#scene-%E5%86%85%E7%BD%AE%E5%9C%B0%E5%9B%BE%E7%BB%84%E4%BB%B6","aria-label":"scene 内置地图组件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241}}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"zoom 地图放大缩小 默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259}}},{"type":"raw","value":"scene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
new L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
new L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
new L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
var overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
control.addTo(scene);\n
control.setPosition('bottomright');\n
control.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
const baseControl = new L7.Control.Base(option);\n
string
","position":{"start":{"line":14,"column":12,"offset":157},"end":{"line":14,"column":20,"offset":165}}},{"type":"text","value":" 控件位置支持是个方位 ","position":{"start":{"line":14,"column":20,"offset":165},"end":{"line":14,"column":32,"offset":177}}},{"type":"raw","value":"bottomright, topright, bottomleft, topleft
","position":{"start":{"line":14,"column":32,"offset":177},"end":{"line":14,"column":76,"offset":221}}}],"position":{"start":{"line":14,"column":1,"offset":146},"end":{"line":14,"column":76,"offset":221}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{"id":"scene-内置地图组件"},"children":[{"type":"element","tagName":"a","properties":{"href":"#scene-%E5%86%85%E7%BD%AE%E5%9C%B0%E5%9B%BE%E7%BB%84%E4%BB%B6","aria-label":"scene 内置地图组件 permalink","class":"anchor"},"children":[{"type":"raw","value":""}]},{"type":"text","value":"scene 内置地图组件","position":{"start":{"line":17,"column":6,"offset":229},"end":{"line":17,"column":18,"offset":241}}}],"position":{"start":{"line":17,"column":1,"offset":224},"end":{"line":17,"column":18,"offset":241}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"zoom 地图放大缩小 默认添加","position":{"start":{"line":18,"column":1,"offset":242},"end":{"line":18,"column":18,"offset":259}}},{"type":"raw","value":"scene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
new L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
new L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
new L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
var overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
control.addTo(scene);\n
control.setPosition('bottomright');\n
control.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺
\nconst baseControl = new L7.Control.Base(option);\n
position: string
控件位置支持是个方位 bottomright, topright, bottomleft, topleft
zoom 地图放大缩小 默认添加
Scale 地图比例尺 默认添加
attribution 地图数据属性 默认添加
layer 图层列表
scene配置项设置控件添加状态
\nscene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
放大缩小组件 默认 左上角
\nnew L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
比例尺组件默认左下角
\nnew L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
默认右下角
\nnew L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
图层列表目前只支持可视化overlayers 图层控制
\nvar overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
组件添加到地图Scene时调用,自定义组件时需要实现此方法
\n添加到地图scene
\ncontrol.addTo(scene);\n
设置组件位置
\ncontrol.setPosition('bottomright');\n
移除地图组件
\ncontrol.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺
\nconst baseControl = new L7.Control.Base(option);\n
position: string
控件位置支持是个方位 bottomright, topright, bottomleft, topleft
zoom 地图放大缩小 默认添加
Scale 地图比例尺 默认添加
attribution 地图数据属性 默认添加
layer 图层列表
scene配置项设置控件添加状态
\nscene = new L7.scene({\n zoomControl: true,\n scaleControl: true,\n attributionControl: true,\n});\n
放大缩小组件 默认 左上角
\nnew L7.Control.Zoom({\n position: 'topleft',\n}).addTo(scene);\n
比例尺组件默认左下角
\nnew L7.Control.Scale({\n position: 'bottomleft',\n}).addTo(scene);\n
默认右下角
\nnew L7.Control.Attribution({\n position: 'bottomleft',\n}).addTo(scene);\n
图层列表目前只支持可视化overlayers 图层控制
\nvar overlayers = {\n 围栏填充: layer,\n 围栏边界: layer2,\n};\nnew L7.Control.Layers({\n overlayers: overlayers,\n}).addTo(scene);\n
组件添加到地图Scene时调用,自定义组件时需要实现此方法
\n添加到地图scene
\ncontrol.addTo(scene);\n
设置组件位置
\ncontrol.setPosition('bottomright');\n
移除地图组件
\ncontrol.remove();\n
var legend = new L7.Control.Base({\n position: 'bottomright',\n});\nlegend.onAdd = function() {\n var el = document.createElement('div');\n el.className = 'infolegend legend';\n var grades = [0, 8, 15, 30, 65, 120];\n for (var i = 0; i < grades.length; i++) {\n el.innerHTML +=\n '<i style=\"background:' +\n colors[i] +\n '\"></i> ' +\n grades[i] +\n (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n }\n return el;\n};\nlegend.addTo(scene);\n
Scene
基础的地图类,提供地图创建,图层创建,管理等功能
示例代码
\nimport { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
Scene
支持两种实例化方式
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
_L7 基于高德地图3D模式开发的,因此传入Map实例 _viewModes需要设置成3d
_
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。
map 实例方法见高德地图文档
scene.map;\n
新建点图层
\n新建线图层
\n新建面图层
\n新建图片图层
\n需传入 dom 容器或者容器 id {domObject || string} [必选]
\n地图初始显示级别 {number} (0-22)
\n地图初始中心经纬度 {Lnglat}
\n地图初始俯仰角度 {number} default 0
\n地图样式 {style} 目前仅支持高德地图。 default 'dark'
L7 内置三种种默认地图样式 dark | light|blank 空地图
设置地图的显示样式,目前支持两种地图样式:
第一种:自定义地图样式,如"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
可前往地图自定义平台定制自己的个性地图样式;
第二种:官方样式模版,如"amap://styles/grey"
。
其他模版样式及自定义地图的使用说明见开发指南
地图最小缩放等级 {number} default 0 (0-22)
\n地图最大缩放等级 {number} default 22 (0-22)
\n地图是否可旋转 {Boolean} default true
\n获取当前缩放等级
\nscene.getZoom();\n
return {float} 当前缩放等级
\n获取所有的地图图层
\nscene.getLayers();\n
return 图层数组 {Array}
\n获取地图中心点
\nscene.getCenter();\n
return {Lnglat} :地图中心点
\n获取地图容器大小
\nscene.getSize();\n
return { Object } 地图容器的 width,height
\n获取地图俯仰角
\nscene.getPitch();\n
return {number} pitch
\n设置地图中心点坐标
\nscene.setCenter([lng, lat]);\n
参数:center
{LngLat} 地图中心点
设置地图等级和中心
\nscene.setZoomAndCenter(zoom, center);\n
参数:zoom {number}
center {LngLat}
设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 [0-360]
\nscene.setRotation(rotation);\n
参数: rotation
{number}
地图放大一级
\nscene.zoomIn();\n
地图缩小一级
\nscene.ZoomOUt();\n
地图平移到指定的位置
\nscene.panTo(LngLat);\n
参数:center
LngLat 中心位置坐标
以像素为单位沿X方向和Y方向移动地图
\nscene.panBy(x, y);\n
参数:x
{number} 水平方向移动像素 向右为正方向
y
{number} 垂直方向移动像素 向下为正方向
设置地图仰俯角度
\nscene.setPitch(pitch);\n
参数 :
pitch
{number}
设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等
\nscene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
地图缩放到某个范围内
参数 :
extent
{ array} 经纬度范围 [minlng,minlat,maxlng,maxlat]
scene.fitBounds([112, 32, 114, 35]);\n
移除layer
\nscene.removeLayer(layer);\n
参数layer
{Layer}
获取所有的layer
\nscene.getLayers();\n
return layers {array}
\n事件监听
\neventName
{string} 事件名hander
{function } 事件回调函数
移除事件监听eventName
{string} 事件名hander
{function } 事件回调函数
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
Scene
基础的地图类,提供地图创建,图层创建,管理等功能
示例代码
\nimport { Scene } from '@l7/scene';\nconst scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [110.770672, 34.159869],\n pitch: 45,\n});\n
Scene
支持两种实例化方式
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
_L7 基于高德地图3D模式开发的,因此传入Map实例 _viewModes需要设置成3d
_
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。
map 实例方法见高德地图文档
scene.map;\n
新建点图层
\n新建线图层
\n新建面图层
\n新建图片图层
\n需传入 dom 容器或者容器 id {domObject || string} [必选]
\n地图初始显示级别 {number} (0-22)
\n地图初始中心经纬度 {Lnglat}
\n地图初始俯仰角度 {number} default 0
\n地图样式 {style} 目前仅支持高德地图。 default 'dark'
L7 内置三种种默认地图样式 dark | light|blank 空地图
设置地图的显示样式,目前支持两种地图样式:
第一种:自定义地图样式,如"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
可前往地图自定义平台定制自己的个性地图样式;
第二种:官方样式模版,如"amap://styles/grey"
。
其他模版样式及自定义地图的使用说明见开发指南
地图最小缩放等级 {number} default 0 (0-22)
\n地图最大缩放等级 {number} default 22 (0-22)
\n地图是否可旋转 {Boolean} default true
\n获取当前缩放等级
\nscene.getZoom();\n
return {float} 当前缩放等级
\n获取所有的地图图层
\nscene.getLayers();\n
return 图层数组 {Array}
\n获取地图中心点
\nscene.getCenter();\n
return {Lnglat} :地图中心点
\n获取地图容器大小
\nscene.getSize();\n
return { Object } 地图容器的 width,height
\n获取地图俯仰角
\nscene.getPitch();\n
return {number} pitch
\n设置地图中心点坐标
\nscene.setCenter([lng, lat]);\n
参数:center
{LngLat} 地图中心点
设置地图等级和中心
\nscene.setZoomAndCenter(zoom, center);\n
参数:zoom {number}
center {LngLat}
设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 [0-360]
\nscene.setRotation(rotation);\n
参数: rotation
{number}
地图放大一级
\nscene.zoomIn();\n
地图缩小一级
\nscene.ZoomOUt();\n
地图平移到指定的位置
\nscene.panTo(LngLat);\n
参数:center
LngLat 中心位置坐标
以像素为单位沿X方向和Y方向移动地图
\nscene.panBy(x, y);\n
参数:x
{number} 水平方向移动像素 向右为正方向
y
{number} 垂直方向移动像素 向下为正方向
设置地图仰俯角度
\nscene.setPitch(pitch);\n
参数 :
pitch
{number}
设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等
\nscene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
地图缩放到某个范围内
参数 :
extent
{ array} 经纬度范围 [minlng,minlat,maxlng,maxlat]
scene.fitBounds([112, 32, 114, 35]);\n
移除layer
\nscene.removeLayer(layer);\n
参数layer
{Layer}
获取所有的layer
\nscene.getLayers();\n
return layers {array}
\n事件监听
\neventName
{string} 事件名hander
{function } 事件回调函数
移除事件监听eventName
{string} 事件名hander
{function } 事件回调函数
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', ev => {}); // 鼠标左键点击事件\nscene.on('dblclick', ev => {}); // 鼠标左键双击事件\nscene.on('mousemove', ev => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', ev => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', ev => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', ev => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', ev => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', ev => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', ev => {}); // 鼠标右键单击事件\nscene.on('dragstart', ev => {}); //开始拖拽地图时触发\nscene.on('dragging', ev => {}); // 拖拽地图过程中触发\nscene.on('dragend', ev => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
地图标注信息窗口,用于展示地图要素的属性信息
\nPopup
\nconst popup = new L7.Popup(option);\n
设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]
popup.setLnglat([112, 32]);\n
参数:scene 地图scene实例
\n将popup添加到地图scene显示
\npopup.addTo(scene);\n
参数:html 字符串
\n设置popup html 内容
\nvar html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
设置 popup 显示文本内容
\npopup.setText('hello world');\n
移除popup
\npopup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
地图标注信息窗口,用于展示地图要素的属性信息
\nPopup
\nconst popup = new L7.Popup(option);\n
设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]
popup.setLnglat([112, 32]);\n
参数:scene 地图scene实例
\n将popup添加到地图scene显示
\npopup.addTo(scene);\n
参数:html 字符串
\n设置popup html 内容
\nvar html =\n '<p>\\u7701\\u4EFD\\uFF1A' +\n feature.s +\n '</p>\\n <p>\\u5730\\u533A\\uFF1A' +\n feature.m +\n '</p>\\n <p>\\u6E29\\u5EA6\\uFF1A' +\n feature.t +\n '</p>\\n ';\npopup.setHtml(html);\n
设置 popup 显示文本内容
\npopup.setText('hello world');\n
移除popup
\npopup.remove();\n
popup.on('close', () => {});\n
var html = '<p>'+feature.m+'</p>';\n const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
Marker 地图标注 目前只支持2D dom标注
\nMarkerconst Marker = new L7.Marker(option)
string
设置默认marker的颜色Dom|string
自定义marker Dom节点,可以是dom实例,也可以是dom idstring
锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, rightArray
偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量设置marker经纬度位置
\n将marker添加到地图Scene
\n移除marker
\n获取marker dom Element
\n获取marker经纬度坐标
\n开启或者关闭marker弹出框
\n为marker设置popup
\n获取marker弹出框
\n**const marker = new L7.Marker({color:'blue'})
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
Marker 地图标注 目前只支持2D dom标注
\nMarkerconst Marker = new L7.Marker(option)
string
设置默认marker的颜色Dom|string
自定义marker Dom节点,可以是dom实例,也可以是dom idstring
锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, rightArray
偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量设置marker经纬度位置
\n将marker添加到地图Scene
\n移除marker
\n获取marker dom Element
\n获取marker经纬度坐标
\n开启或者关闭marker弹出框
\n为marker设置popup
\n获取marker弹出框
\n**const marker = new L7.Marker({color:'blue'})
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n element: el,\n})\n .setLnglat([data[i].x * 1, data[i].y])\n .addTo(scene);\n
var popup = new L7.Popup({\n anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n element: el,\n})\n .setLnglat(item.coordinates)\n .setPopup(popup)\n .addTo(scene);\n
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [110.478515625, 32.76880048488168],\n [117.68554687499999, 32.76880048488168],\n [117.68554687499999, 37.64903402157866],\n [110.478515625, 37.64903402157866],\n [110.478515625, 32.76880048488168]\n ]\n ]\n }\n }\n ]\n}\n
Scene
基础的地图类,提供地图创建,图层创建,管理等功能
示例代码
\nimport {Scene} from '@l7/scene';\nconst scene =new L7.Scene({\n id:'map'\n mapStyle:'dark',\n center:[ 110.770672, 34.159869 ],\n pitch:45\n})
Scene
支持两种实例化方式
const scene = new L7.Scene({\n id: 'map',\n mapStyle: 'dark',\n center: [120.19382669582967, 30.258134],\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n
_L7 基于高德地图3D模式开发的,因此传入Map实例 _viewModes需要设置成3d
_
var mapinstance = new AMap.Map('map', {\n center: [120.19382669582967, 30.258134],\n viewMode: '3D',\n pitch: 0,\n zoom: 12,\n maxZoom: 20,\n minZoom: 0,\n});\n\nconst scene = new L7.Scene({\n mapStyle: 'dark',\n map: mapinstance,\n});\n
L7 在scene 下保留了高德地图实例,可以通过scene.map 调用高德地图的map方法。
map 实例方法见高德地图文档
scene.map;\n
新建点图层
\n新建线图层
\n新建面图层
\n新建图片图层
\n需传入 dom 容器或者容器 id {domObject || string} [必选]
\n地图初始显示级别 {number} (0-22)
\n地图初始中心经纬度 {Lnglat}
\n地图初始俯仰角度 {number} default 0
\n地图样式 {style} 目前仅支持高德地图。 default 'dark'
L7 内置三种种默认地图样式 dark | light|blank 空地图
设置地图的显示样式,目前支持两种地图样式:
第一种:自定义地图样式,如"amap://styles/d6bf8c1d69cea9f5c696185ad4ac4c86"
可前往地图自定义平台定制自己的个性地图样式;
第二种:官方样式模版,如"amap://styles/grey"
。
其他模版样式及自定义地图的使用说明见开发指南
地图最小缩放等级 {number} default 0 (0-22)
\n地图最大缩放等级 {number} default 22 (0-22)
\n地图是否可旋转 {Boolean} default true
\n获取当前缩放等级
\nscene.getZoom();\n
return {float} 当前缩放等级
\n获取所有的地图图层
\nscene.getLayers();\n
return 图层数组 {Array}
\n获取地图中心点
\nscene.getCenter();\n
return {Lnglat} :地图中心点
\n获取地图容器大小
\nscene.getSize();\n
return { Object } 地图容器的 width,height
\n获取地图俯仰角
\nscene.getPitch();\n
return {number} pitch
\n设置地图中心点坐标
\nscene.setCenter([lng, lat]);\n
参数:center
{LngLat} 地图中心点
设置地图等级和中心
\nscene.setZoomAndCenter(zoom, center);\n
参数:zoom {number}
center {LngLat}
设置地图顺时针旋转角度,旋转原点为地图容器中心点,取值范围 [0-360]
\nscene.setRotation(rotation);\n
参数: rotation
{number}
地图放大一级
\nscene.zoomIn();\n
地图缩小一级
\nscene.ZoomOUt();\n
地图平移到指定的位置
\nscene.panTo(LngLat);\n
参数:center
LngLat 中心位置坐标
以像素为单位沿X方向和Y方向移动地图
\nscene.panBy(x, y);\n
参数:x
{number} 水平方向移动像素 向右为正方向
y
{number} 垂直方向移动像素 向下为正方向
设置地图仰俯角度
\nscene.setPitch(pitch);\n
参数 :
pitch
{number}
设置当前地图显示状态,包括是否可鼠标拖拽移动地图、地图是否可缩放、地图是否可旋转(rotateEnable)、是否可双击放大地图、是否可以通过键盘控制地图旋转(keyboardEnable)等
\nscene.setStatus({\n dragEnable: true,\n keyboardEnable: true,\n doubleClickZoom: true,\n zoomEnable: true,\n rotateEnable: true,\n});\n
地图缩放到某个范围内
参数 :
extent
{ array} 经纬度范围 [minlng,minlat,maxlng,maxlat]
scene.fitBounds([112, 32, 114, 35]);\n
移除layer
\nscene.removeLayer(layer);\n
参数layer
{Layer}
获取所有的layer
\nscene.getLayers();\n
return layers {array}
\n事件监听
\neventName
{string} 事件名hander
{function } 事件回调函数
移除事件监听eventName
{string} 事件名hander
{function } 事件回调函数
scene.on('loaded', () => {}); //地图加载完成触发\nscene.on('mapmove', () => {}); // 地图平移时触发事件\nscene.on('movestart', () => {}); // 地图平移开始时触发\nscene.on('moveend', () => {}); // 地图移动结束后触发,包括平移,以及中心点变化的缩放。如地图有拖拽缓动效果,则在缓动结束后触发\nscene.on('zoomchange', () => {}); // 地图缩放级别更改后触发\nscene.on('zoomstart', () => {}); // 缩放开始时触发\nscene.on('zoomend', () => {}); // 缩放停止时触发\n
scene.on('click', (ev) => {}); // 鼠标左键点击事件\nscene.on('dblclick', (ev) => {}); // 鼠标左键双击事件\nscene.on('mousemove', (ev) => {}); // 鼠标在地图上移动时触发\nscene.on('mousewheel', (ev) => {}); // 鼠标滚轮开始缩放地图时触发\nscene.on('mouseover', (ev) => {}); // 鼠标移入地图容器内时触发\nscene.on('mouseout', (ev) => {}); // 鼠标移出地图容器时触发\nscene.on('mouseup', (ev) => {}); // 鼠标在地图上单击抬起时触发\nscene.on('mousedown', (ev) => {}); // 鼠标在地图上单击按下时触发\nscene.on('rightclick', (ev) => {}); // 鼠标右键单击事件\nscene.on('dragstart', (ev) => {}); //开始拖拽地图时触发\nscene.on('dragging', (ev) => {}); // 拖拽地图过程中触发\nscene.on('dragend', (ev) => {}); //停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发\n
scene.on('resize', () => {}); // 地图容器大小改变事件\n
=i&&c.push(this.parsePoint(t,[f[a],f[o]])),f[a]===u)break}return c},e.prototype.getBBox=function(t){for(var e=[],i=[],n=0;n 1){var f=o[0],d=Math.abs(t.y-f.y);l.each(o,(function(e){Math.abs(t.y-e.y)<=d&&(f=e,d=Math.abs(t.y-e.y))})),!f||l.isNil(f.x)||l.isNil(f.y)||(a=[f]),o=[f]}this._setTooltip(t,o,a,i),e.setActive((function(t){var e=!1;return l.each(o,(function(i){if(i.point._origin===t)return e=!0,!1})),e}),!1)}else this.hideTooltip()}},t.prototype.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._offEvent()},t.prototype._getCanvas=function(){return this.view.get("canvas")},t.prototype._getTriggerEvent=function(){var t,e=l.get(this.options,"triggerOn");return e&&"mousemove"!==e?"click"===e?t="panel:click":"none"===e&&(t=null):t="panel:mousemove",t},t.prototype._getDefaultTooltipOptions=function(){var t,e=this.view,i=this.options,n=this.theme,r=l.mix({},n.tooltip),a=l.filter(e.getElements(),(function(t){return t.get("visible")})),o=l.uniq(l.map(a,(function(t){return t.get("type")}))),s=!!e.get("coord")&&e.get("coord").isTransposed;if(e.get("coord")&&"cartesian"===e.get("coord").type)if("interval"===o[0])!1!==i.shape&&((u=l.mix({},n.tooltipCrosshairsRect)).isTransposed=s,t={zIndex:0,crosshairs:u});else if(l.indexOf(Ze,o[0])>-1){var u;(u=l.mix({},n.tooltipCrosshairsLine)).isTransposed=s,t={crosshairs:u}}return l.mix(r,t)},t.prototype._bindEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.on(e,this.onMouseMove),t.on("panel:mouseleave",this.onMouseOut))},t.prototype._offEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.off(e,this.onMouseMove),t.off("panel:mouseleave",this.onMouseOut))},t.prototype._setTooltip=function(t,e,i,n){var r=this.tooltip,a=this.prePoint;if(!a||a.x!==t.x||a.y!==t.y){var o=$e(e);this.prePoint=t;var s=this.view,u=this.theme,c=l.isArray(t.x)?t.x[t.x.length-1]:t.x,h=l.isArray(t.y)?t.y[t.y.length-1]:t.y;r.get("visible")||s.emit("tooltip:show",{x:c,y:h,tooltip:r});var p=o[0],f=p.title||p.name;r.isContentChange(f,o)&&(s.emit("tooltip:change",{tooltip:r,x:c,y:h,items:o}),f=o[0].title||o[0].name,r.setContent(f,o),l.isEmpty(i)?(r.clearMarkers(),r.set("markerItems",[])):!1===this.options.showTooltipMarkers?r.set("markerItems",i):r.setMarkers(i,u.tooltipMarker)),r.setPosition(c+(s.get("panelGroup").get("x")||0),h+(s.get("panelGroup").get("y")||0),n),r.show()}},t.prototype._getItemMarker=function(t,e){var i=t.get("shapeType")||"point",n=t.getDefaultValue("shape")||"circle",r={color:e};return Ge(i).getMarkerStyle(n,r)},t}(),Je=function(){function t(t){void 0===t&&(t={view:null}),this._states={},this._stateStack={},this.view=t.view}return t.prototype.setState=function(t,e,i){this._stateStack[t]={exp:e,draw:i},this._onUpdate()},t.prototype.getState=function(t){return this._states[t]},t.prototype.getAllStates=function(){return this._states},t.prototype.clear=function(){this._states={},this._stateStack={},this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)},t.prototype._onUpdate=function(){var t=this,e=this._stateStack;this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null),this._changeTimer=setTimeout((function(){for(var i in e){var n=e[i],r=n.exp;t._states[i]&&t._states[i]===r||(t._states[i]=r,t._triggerEvent(i,n))}t._stateStack={}}),16)},t.prototype._triggerEvent=function(t,e){this.view.emit(t+":change",Object(h.__assign)({name:t},e))},t}();function ti(t,e){var i=t.get("backgroundGroup").get("backShape"),n=t.get("panelGroup").get("backShape");return i===e||n===e}function ei(t){t.target&&t.target.get("origin")&&(t.data=t.target.get("origin"))}function ii(t,e){return!(!t||!e||t!==e)}function ni(t,e,i){return!(t===i||!e.isShapeInView(t))}function ri(t,e){for(var i=t;i=i.get("parent");)if(i===e)return!0;return!1}var ai=function(){function t(t){void 0===t&&(t={view:null,canvas:null}),this.view=t.view,this.canvas=t.canvas,this._panelGroup=this.view.get("panelGroup"),this._eventHandlers=[],this._pixelRatio=this.canvas.get("pixelRatio")}return t.prototype._getEventObj=function(t){return{x:t.x/this._pixelRatio,y:t.y/this._pixelRatio,target:t.target,event:t.event}},t.prototype._triggerShapeEvent=function(t,e,i){var n=t.name;if(n&&!t.get("destroyed")){var r=this.view,a=n+":"+e;i.view=r,i.appendInfo=t.get("appendInfo"),r.emit(a,i)}},t.prototype._addEvent=function(t,e,i){t.on(e,i),this._eventHandlers.push({target:t,type:e,handler:i})},t.prototype.bindEvents=function(){var t=this.view.get("container");this._addEvent(t,"mousedown",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"mousemove",l.wrapBehavior(this,"_onMove")),this._addEvent(t,"mouseup",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"click",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"dblclick",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"contextmenu",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"wheel",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchstart",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchmove",l.wrapBehavior(this,"_onEvents")),this._addEvent(t,"touchend",l.wrapBehavior(this,"_onEvents")),this._addEvent(this.canvas,"mousemove",l.wrapBehavior(this,"_onCanvasMove"));var e=this.canvas.get("canvasDOM");this._canvasDomLeaveHandler=l.wrapBehavior(this,"_onCanvasDomLeave"),e.addEventListener("mouseleave",this._canvasDomLeaveHandler)},t.prototype._onEvents=function(t){var e=t.type,i=this._getEventObj(t),n=t.target;ei(i),ti(this.view,n)||this._triggerShapeEvent(n,e,i);var r=n.get("parent");if(r){var a=r.get("name");a&&"panelGroup"===a&&this.view.emit("panel:"+e,i)}this.view.emit(e,i)},t.prototype._onMove=function(t){var e=this._getEventObj(t),i=t.target;ei(e),this.view.emit("mousemove",e);var n=ti(this.view,i);n||this._triggerShapeEvent(i,"mousemove",e);var r=this._lastShape,a=ti(this.view,r);!r||a||ii(r,i)||(ei(this._getEventObj(t)),this._triggerShapeEvent(r,"mouseleave",e));if(!n&&!ii(r,i)){var o=this._getEventObj(t);ei(o),this._triggerShapeEvent(i,"mouseenter",o)}var s=ri(i,this._panelGroup),u=!!r&&ri(r,this._panelGroup);s?u?this.view.emit("panel:mousemove",e):this.view.emit("panel:mouseenter",e):u&&this.view.emit("panel:mouseleave",e),this._lastShape=i},t.prototype._onCanvasMove=function(t){var e=l.isArray(t)?t[0]:t,i=this._getEventObj(e),n=this.canvas,r=this.view,a=e.target,o=ni(a,r,n),s=!!this._lastCanvasTarget&&ni(this._lastCanvasTarget,r,n);a!==this._lastCanvasTarget&&(s&&!o?this.view.emit("mouseleave",i):!s&&o&&this.view.emit("mouseenter",i)),this._lastCanvasTarget=a},t.prototype._onCanvasDomLeave=function(t){var e=this._getEventObj(t);e.event=t,this.view.emit("panel:mouseleave",e)},t.prototype.clearEvents=function(){var t=this._eventHandlers;l.each(t,(function(t){t.target.off(t.type,t.handler)})),this.canvas.get("canvasDOM").removeEventListener("mouseleave",this._canvasDomLeaveHandler)},t}(),oi=function(){function t(t,e){this.view=t,this.cfg=e,this.init()}return t.prototype.init=function(){this.container=this._createContainer();var t=this.view.get("data");this.facets=this.generateFacets(t)},t.prototype._createContainer=function(){return this.view.get("frontgroundGroup").addGroup()},t.prototype.render=function(){this._renderViews(),this.renderTitle(),this.renderAxis()},t.prototype._renderViews=function(){this._clearFacetViews(),this._createFacetViews()},t.prototype._createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype._clearFacetViews=function(){var t=this;l.each(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.facetToView=function(t){var e=t.region,i=t.data,n=this.view.createView({start:e.start,end:e.end,padding:l.get(t,"padding",this.cfg.padding||0)});n.data(i||[]),this.beforeProcessView(n,t);var r=this.cfg.eachView;return r&&r(n,t),this.afterProcessView(n,t),t.view=n,n},t.prototype.clear=function(){this._clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&this.container.remove(),this.view=void 0,this.facets=[],this.container=void 0,this.destroyed=!0},t.prototype.beforeProcessView=function(t,e){},t.prototype.afterProcessView=function(t,e){},t.prototype.getFieldValues=function(t,e){var i=[],n={};return l.each(t,(function(t){var r=t[e];l.isNil(r)||n[r]||(i.push(r),n[r]=!0)})),i},t.prototype.getRegion=function(t,e,i,n){var r=1/(0===e?1:e),a=1/(0===t?1:t);return{start:{x:r*i,y:a*n},end:{x:r*(i+1),y:a*(n+1)}}},t}(),si={},ui=function(t,e){si[l.lowerFirst(t)]=e},li={},ci=function(t){return li[t.toLowerCase()]},hi=function(t,e){if(ci(t))throw new Error("Element type '"+t+"' existed.");var i=t.toLowerCase();li[i]=e,Ri(i,e)};function pi(t,e,i){var n=i.translate(t),r=i.translate(e);return i.isCategory?n===r:l.isNumberEqual(n,r)}function fi(t){return t.alias||t.field}var di=function(){function t(t){this.element=null,this._xDistance=null,this.element=t}return t.prototype.findPoint=function(t,e){if(0===e.length)return null;var i=this.element,n=i.get("type"),r=i.getXScale(),a=i.getYScale(),o=r.field,s=a.field,u=null;if("point"===n||"heatmap"===n){var c=i.get("coord").invert(t),h=r.invert(c.x),p=a.invert(c.y),f=1/0;return l.each(e,(function(t){var e=t._origin,i=Math.pow(e[o]-h,2)+Math.pow(e[s]-p,2);i c&&(c=h-l);o;)for(f.forEach((function(t){var e=(Math.min.apply(p,t.targets)+Math.max.apply(p,t.targets))/2;t.pos=Math.min(Math.max(p,e-t.size/2),c-t.size)})),o=!1,a=f.length;a--;)if(a>0){var d=f[a-1],g=f[a];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>c&&(d.pos=c-d.size),f.splice(a,1),o=!0)}a=0,f.forEach((function(i){var n=l+e/2;i.targets.forEach((function(){t[a].y=i.pos+n,n+=e,a++}))})),t.forEach((function(t){var e=t.r*t.r,i=Math.pow(Math.abs(t.y-n.y),2);if(e=0?e:i<=0?i:0},e.prototype.getShapeId=function(t){var e=this.get("id"),i=this.get("keyFields");if(i&&i.length>0)l.each(i,(function(i){e=e+"-"+t[i]}));else{var n=this.get("type"),r=this.getXScale(),a=this.getYScale(),o=r.field||"x",s=a.field||"y",u=t[s],c=void 0;c=r.isIdentity?r.values[0]:t[o],e="interval"===n||"schema"===n?e+"-"+c:"line"===n||"area"===n||"path"===n?e+"-"+n:e+"-"+c+"-"+u;var h=this.getGroupScales();l.isEmpty(h)||l.each(h,(function(i){var n=i.field;"identity"!==i.type&&(e=e+"-"+t[n])}))}return e},e.prototype.getOriginDataByPoint=function(t){var e,i=this.getXScale(),n=this.getYScale(),r=this.get("coord").invert(t),a=i.invert(r.x),o=n.invert(r.y),s=i.field,u=n.field;return(e={})[s]=a,e[u]=o,e},e.prototype.createShapePointsCfg=function(t){var e=this.getXScale(),i=this.getYScale();return{x:this._normalizeValues(t[e.field],e),y:i?this._normalizeValues(t[i.field],i):t.y?t.y:.1,y0:i?i.scale(this.getYMinValue()):void 0}},e.prototype.draw=function(t,e,i,n){for(var r=0,a=t.length;r1){var v=g[1];v.change({nice:!1,min:0,max:Math.max.apply(null,v.values)})}if(u.scales=g,-1!==l.indexOf(["color","size","shape","opacity"],s)&&1===g.length&&g[0].isIdentity)u.values=g[0].values;else if(!c&&!p)if("size"===s)u.values=a.sizes;else if("shape"===s)u.values=a.shapes[o]||[];else if("opacity"===s)u.values=a.opacities;else if("color"===s&&g.length){var y=g[0].values.length;u.values=y<=10?a.colors:a.colors_20}var m=Object(gt.getAttribute)(s);i[s]=new m(u)}))},e.prototype._updateStackRange=function(t,e,i){for(var n=l.flatten(i),r=e.min,a=e.max,o=0,s=n.length;oa&&(a=h)}(r>>1;t(e[u])>i?s=u:o=u+1}return o})(i,(o-a)/r);s===i.length?this.interval=n.last(i):s?this.interval=i[s]:(r=Math.min(Math.floor((o-a)/1e3),r),this.interval=i[0]);var u=this.interval[1],l=function(t,e,i){void 0===i&&(i=5);var n={max:0,min:0,ticks:[]},r=(e-t)/i,a=Math.pow(10,Math.floor(Math.log10(r))),o=a<1?Math.ceil(Math.abs(Math.log10(a))):0,s=a;2*a-r<1.5*(r-s)&&5*a-r<2.75*(r-(s=2*a))&&10*a-r<1.5*(r-(s=5*a))&&(s=10*a);var u=Math.ceil(e/s),l=Math.floor(t/s);n.max=Math.max(u*s,e),n.min=Math.min(l*s,t);for(var c=Number.parseFloat((l*s).toFixed(o));c=e&&t<=i}e.dotProduct2D=function(t,e){return t.x*e.y+t.y*e.x},e.applyMatrix=o,e.isBetween=s;var u=.001;function l(t,e){for(var i=!1,n=0,r=e.length-1;nthis.width/n?(e=this.width/n,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-a)*e*n,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,i=this.getCenter(),n=t.x,r=t.y;return this.isTransposed&&(n=(e=[r,n])[0],r=e[1]),n=this.convertDim(n,"x"),r=this.convertDim(r,"y"),{x:i.x+Math.cos(n)*r,y:i.y+Math.sin(n)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),i=[t.x-e.x,t.y-e.y],a=[1,0,0,0,1,0,0,0,1];n.mat3.rotate(a,a,this.startAngle);var o=[1,0,0];n.vec3.transformMat3(o,o,a),o=[o[0],o[1]];var s=n.vec2.angleTo(o,i,this.endAngle1?t-1:t,r.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setTicks=function(){var t=this,e=this.values;if(r.isNumber(this.tickInterval))return r.filter(e,(function(e,i){return i%(t.tickInterval+1)==0}));if(r.isNumber(this.tickCount)){var i=o.ALL_Q.filter((function(t){return Number.isInteger(t)})),n=o.default(this.min,this.max,this.tickCount,!1,i).ticks;return r.filter(n,(function(e){return e>=t.min&&e<=t.max})).map((function(e){return t.values[e]}))}return this.values},e}(a.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(57),o=i(58),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.scale=function(t){if(r.isNil(t))return NaN;var e=this._transform(this.max),i=this._transform(this.min);if(i===e)return.5;var n=Math.min(Math.max(this._transform(t),i),e),a=this._calcPercent(n,i,e),o=r.head(this.range),s=r.last(this.range);return this._calcValue(a,o,s)},e.prototype.invert=function(t){var e=r.head(this.range),i=r.last(this.range),n=this._transform(this.max),a=this._transform(this.min),o=this._calcPercent(t,e,i);return this._calcValue(o,a,n)},e.prototype._initDefaultCfg=function(){this.values=[],this.type="linear",this.isLinear=!0,this.nice=!0,this.tickCount=5},e.prototype._init=function(){this._setDomain(),r.isEmpty(this.ticks)&&(this.ticks=this._setTicks())},e.prototype._setDomain=function(){var t=r.getRange(this.values),e=t.min,i=t.max;r.isNil(this.min)&&(this.min=e),r.isNil(this.max)&&(this.max=i),this.min>this.max&&(console.error("min should less than max"),this.min=e,this.max=i)},e.prototype._transform=function(t){return t},e.prototype._setTicks=function(){var t,e,i,n,a=this,s=this._getAlgoParams(),u=s.onlyLoose,l=s.Q,c=s.w,h=s.m,p=[],f=this.minLimit,d=this.maxLimit;r.isNil(f)||r.isNil(d)||f!==d||(console.error("minLimit should less than maxLimit"),0===(f/=2)&&(d=1)),(i=r.isNil(f)?this.min:this.minLimit)>(n=r.isNil(d)?this.max:this.maxLimit)&&(console.error("minLimit should less than maxLimit"),i=(t=[n,i])[0],n=t[1],f=(e=[d,f])[0],d=e[1]);var g=o.default(i,n,h,u,l,c),v=g.min,y=g.max,m=g.ticks;return this.nice&&(this.min=v,this.max=y),r.isNil(f)||(this.min=f),r.isNil(d)||(this.max=d),p.push(this.min),r.each(m,(function(t){t>a.min&&t\n
'));var u=o.deepMix({},c,this.get("listStyle"));"horizontal"===n&&(u.width="max-content"),r.modifyCSS(s,u);var l=r.createDom("");i.appendChild(l),l.appendChild(s),this.set("_clipContainer",l),this.set("_itemGroupContainer",s);var f=this.get("itemTpl");f||(f='
=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,s=o.rgb2arr(r),u=Math.round(.299*s[0]+.587*s[1]+.114*s[2])/a,l=this._mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u);t.attr("fill",l)}else i.maxY
{
+ const { t, i18n } = useTranslation();
+
+ const features = [
+ {
+ icon:
+ 'https://gw.alipayobjects.com/zos/basement_prod/5dbaf094-c064-4a0d-9968-76020b9f1510.svg',
+ title: t('架构上灵活可扩展'),
+ description: t('支持地图底图,渲染引擎,图层自由定制、扩展,组合'),
+ },
+ {
+ icon:
+ 'https://gw.alipayobjects.com/zos/basement_prod/0a0371ab-6bed-41ad-a99b-87a5044ba11b.svg',
+ title: t('业务上简洁,通用'),
+ description: t(
+ '以图形符号学地理设计体系理论基础,易用,易理解,且专业,专注,',
+ ),
+ },
+ {
+ icon:
+ 'https://gw.alipayobjects.com/zos/basement_prod/716d0bc0-e311-4b28-b79f-afdd16e8148e.svg',
+ title: t('可视化上酷炫,动感'),
+ description: t('支持海量数据,2D、3D,动态,可交互,高性能渲染。'),
+ },
+ ];
+
+ const companies = [
+ {
+ name: '公司1',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Z1NnQ6L4xCIAAAAAAAAAAABkARQnAQ',
+ },
+ {
+ name: '公司2',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*6u3hTpsd7h8AAAAAAAAAAABkARQnAQ',
+ },
+ {
+ name: '公司3',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Fw8HTbFgUdAAAAAAAAAAAABkARQnAQ',
+ },
+ {
+ name: '公司4',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*lUdjTqQix48AAAAAAAAAAABkARQnAQ',
+ },
+ {
+ name: '公司5',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*1q8NQZ9GaN0AAAAAAAAAAABkARQnAQ',
+ },
+ {
+ name: '公司6',
+ img:
+ 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*SqmTSqj4FjEAAAAAAAAAAABkARQnAQ',
+ },
+ ];
+
+ const notifications = [
+ {
+ type: t('测试'),
+ title: t('G6 3.2 全新上线!'),
+ date: '2019.12.04',
+ link: '#',
+ },
+ ];
+
+ const cases = [
+ {
+ logo:
+ 'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*2Ij9T76DyCcAAAAAAAAAAABkARQnAQ',
+ title: '灯塔专业版',
+ description:
+ '深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金深入金融的基金',
+ link: '#',
+ image:
+ 'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*oCd7Sq3N-QEAAAAAAAAAAABkARQnAQ',
+ },
+ {
+ logo:
+ 'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*ekkhR7ISzUsAAAAAAAAAAABkARQnAQ',
+ title: '灯塔专业版2',
+ description:
+ '深2222222入金融的基金深入金融的基金深2222222入金融的基金深入金融的基金深2222222入金融的基金深入金融的基金',
+ image:
+ 'https://gw.alipayobjects.com/mdn/rms_23b644/afts/img/A*oCd7Sq3N-QEAAAAAAAAAAABkARQnAQ',
+ },
+ ];
+
+ const downloadButton = {
+ text: '下载使用',
+ link: 'https://antv.alipay.com/zh-cn/index.html',
+ };
+
+ return (
+ <>
+