├── .editorconfig ├── .eslintignore ├── .eslintrc.cjs ├── .github ├── ISSUE_TEMPLATE.md └── workflows │ ├── build-docs-vue3.yml │ └── vue-amap-docs.yml ├── .gitignore ├── .npmrc ├── .nvmrc ├── .workflow └── pipeline-20220623.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── README_en.md ├── build ├── .eslintrc.cjs ├── build-info.ts ├── buildModules.ts ├── full-bundle.ts ├── gulp │ ├── amapGulpFile.ts │ ├── extraGulpFile.ts │ ├── locaGulpFile.ts │ └── utilGulpFile.ts ├── helper.ts ├── plugins │ ├── RemoveGlobalNamePlugin.ts │ ├── changeBuildDate.ts │ ├── map-alias.ts │ └── size-reporter.ts ├── types-definitions.ts └── utils │ ├── constants.ts │ ├── gulp.ts │ ├── log.ts │ ├── paths.ts │ ├── pkg.ts │ ├── process.ts │ └── rollup.ts ├── docs ├── .vuepress │ ├── client.ts │ ├── components │ │ ├── demo │ │ │ ├── vp-codepen.vue │ │ │ ├── vp-example.vue │ │ │ └── vp-source-code.vue │ │ ├── examples │ │ │ ├── amap │ │ │ │ ├── basic-setup.vue │ │ │ │ ├── basic.vue │ │ │ │ ├── get-instance-setup.vue │ │ │ │ ├── get-instance.vue │ │ │ │ ├── plugin-global.vue │ │ │ │ └── plugin-part.vue │ │ │ ├── control │ │ │ │ ├── control-bar.vue │ │ │ │ ├── geolocation.vue │ │ │ │ ├── hawk-eye.vue │ │ │ │ ├── map-type.vue │ │ │ │ ├── scale.vue │ │ │ │ ├── search-box.vue │ │ │ │ └── toolbar.vue │ │ │ ├── hooks │ │ │ │ ├── city-search.vue │ │ │ │ ├── geolocation.vue │ │ │ │ └── weather.vue │ │ │ ├── infoWindow │ │ │ │ └── info-window.vue │ │ │ ├── layer │ │ │ │ ├── data │ │ │ │ │ ├── canvas.vue │ │ │ │ │ ├── custom-xyz.vue │ │ │ │ │ ├── custom.vue │ │ │ │ │ ├── district-cluster.vue │ │ │ │ │ ├── flexible.vue │ │ │ │ │ ├── gl-custom.vue │ │ │ │ │ ├── heat-map.vue │ │ │ │ │ ├── image.vue │ │ │ │ │ ├── labels.vue │ │ │ │ │ ├── tiles3d.vue │ │ │ │ │ ├── vector.vue │ │ │ │ │ └── video.vue │ │ │ │ ├── official │ │ │ │ │ ├── buildings.vue │ │ │ │ │ ├── default.vue │ │ │ │ │ ├── district.vue │ │ │ │ │ ├── indoor-map.vue │ │ │ │ │ ├── road-net.vue │ │ │ │ │ ├── satellite.vue │ │ │ │ │ ├── tile.vue │ │ │ │ │ └── traffic.vue │ │ │ │ └── standard │ │ │ │ │ ├── mapbox-vector.vue │ │ │ │ │ ├── wms.vue │ │ │ │ │ └── wmts.vue │ │ │ ├── loca │ │ │ │ ├── ambient-light.vue │ │ │ │ ├── directional-light.vue │ │ │ │ ├── grid.vue │ │ │ │ ├── heat-map.vue │ │ │ │ ├── hexagon.vue │ │ │ │ ├── icon.vue │ │ │ │ ├── laser.vue │ │ │ │ ├── line.vue │ │ │ │ ├── link.vue │ │ │ │ ├── loca.vue │ │ │ │ ├── point-light.vue │ │ │ │ ├── point.vue │ │ │ │ ├── polygon.vue │ │ │ │ ├── prism.vue │ │ │ │ ├── pulse-line.vue │ │ │ │ ├── pulse-link.vue │ │ │ │ ├── scatter.vue │ │ │ │ └── z-marker.vue │ │ │ ├── marker │ │ │ │ ├── circle-marker.vue │ │ │ │ ├── elastic-marker.vue │ │ │ │ ├── label-marker.vue │ │ │ │ ├── marker-cluster.vue │ │ │ │ ├── marker.vue │ │ │ │ ├── mass-marker.vue │ │ │ │ └── text.vue │ │ │ ├── three │ │ │ │ ├── three-gltf-cache.vue │ │ │ │ ├── three-gltf-popup.vue │ │ │ │ ├── three-gltf.vue │ │ │ │ ├── three-layer-event.vue │ │ │ │ ├── three-polygon.vue │ │ │ │ ├── three-tiles3d.vue │ │ │ │ └── three-video.vue │ │ │ ├── util │ │ │ │ └── mouse-tool.vue │ │ │ └── vector │ │ │ │ ├── bezier-curve.vue │ │ │ │ ├── circle.vue │ │ │ │ ├── ellipse.vue │ │ │ │ ├── geojson.vue │ │ │ │ ├── polygon.vue │ │ │ │ ├── polyline.vue │ │ │ │ └── rectangle.vue │ │ ├── icons │ │ │ ├── back-to-top.vue │ │ │ ├── codepen.vue │ │ │ ├── copy-icon.vue │ │ │ ├── dark.vue │ │ │ ├── element-plus-logo.vue │ │ │ ├── element-plus-text-logo.vue │ │ │ ├── expand.vue │ │ │ ├── external-link-icon.vue │ │ │ ├── github.vue │ │ │ ├── light.vue │ │ │ ├── source-code.vue │ │ │ ├── toggle-button.vue │ │ │ └── translation-icon.vue │ │ ├── vp-demo.vue │ │ └── vp-offline-jsapi.vue │ ├── composables │ │ └── toggle.ts │ ├── config.mjs │ ├── data │ │ └── config.json │ ├── navbar.ts │ ├── plugin │ │ ├── demoPlugin.ts │ │ ├── registerPlugin.ts │ │ └── sitemapPlugin.ts │ ├── public │ │ ├── css │ │ │ └── global.css │ │ ├── favicon.ico │ │ ├── gltf │ │ │ ├── car2.gltf │ │ │ └── sgyj_point_animation.gltf │ │ ├── hdr │ │ │ ├── nx.hdr │ │ │ ├── ny.hdr │ │ │ ├── nz.hdr │ │ │ ├── px.hdr │ │ │ ├── py.hdr │ │ │ └── pz.hdr │ │ ├── images │ │ │ ├── logo.ico │ │ │ ├── logo.png │ │ │ ├── qiang.jpeg │ │ │ ├── screen.jpeg │ │ │ ├── weixin.png │ │ │ ├── youpaiyun.png │ │ │ └── zhifubao.jpg │ │ ├── json │ │ │ └── zmarker.json │ │ └── robots.txt │ ├── sidebar.ts │ ├── theme │ │ ├── client.js │ │ ├── index.ts │ │ └── layouts │ │ │ └── Layout.vue │ └── utils │ │ ├── highlight.ts │ │ └── paths.ts ├── README.md ├── package.json └── zh-cn │ ├── base │ ├── amap.md │ ├── get-amap-instance.md │ └── plugin.md │ ├── component │ ├── control │ │ ├── control-bar.md │ │ ├── geolocation.md │ │ ├── hawk-eye.md │ │ ├── map-type.md │ │ ├── scale.md │ │ ├── search-box.md │ │ └── tool-bar.md │ ├── infoWindow │ │ └── info-window.md │ ├── layer │ │ ├── data │ │ │ ├── canvas.md │ │ │ ├── custom-xyz.md │ │ │ ├── custom.md │ │ │ ├── district-cluster.md │ │ │ ├── flexible.md │ │ │ ├── gl-custom.md │ │ │ ├── heat-map.md │ │ │ ├── image.md │ │ │ ├── labels.md │ │ │ ├── tiles3d.md │ │ │ ├── vector.md │ │ │ └── video.md │ │ ├── official │ │ │ ├── buildings.md │ │ │ ├── default-layer.md │ │ │ ├── district-layer.md │ │ │ ├── indoor-map.md │ │ │ ├── roadNet.md │ │ │ ├── satellite.md │ │ │ ├── tile-layer.md │ │ │ └── traffic.md │ │ └── standard │ │ │ ├── mapbox-vector-tile-layer.md │ │ │ ├── wms.md │ │ │ └── wmts.md │ ├── loca │ │ ├── ambient-light.md │ │ ├── directional-light.md │ │ ├── grid-layer.md │ │ ├── heatmap-layer.md │ │ ├── hexagon-layer.md │ │ ├── icon-layer.md │ │ ├── laser-layer.md │ │ ├── line-layer.md │ │ ├── link-layer.md │ │ ├── loca.md │ │ ├── point-layer.md │ │ ├── point-light.md │ │ ├── polygon-layer.md │ │ ├── prism-layer.md │ │ ├── pulse-line-layer.md │ │ ├── pulse-link-layer.md │ │ ├── scatter-layer.md │ │ └── z-marker-layer.md │ ├── marker │ │ ├── circle-marker.md │ │ ├── elastic-marker.md │ │ ├── label-marker.md │ │ ├── marker-cluster.md │ │ ├── marker.md │ │ ├── mass-marks.md │ │ └── text.md │ ├── three │ │ ├── three-gltf.md │ │ ├── three-layer.md │ │ ├── three-light-ambient.md │ │ ├── three-light-directional.md │ │ ├── three-light-hemisphere.md │ │ ├── three-light-point.md │ │ ├── three-light-spot.md │ │ ├── three-polygon.md │ │ ├── three-tiles3d.md │ │ └── three-video.md │ ├── util │ │ └── mouse-tool.md │ └── vector │ │ ├── bezier-curve.md │ │ ├── circle.md │ │ ├── ellipse.md │ │ ├── geojson.md │ │ ├── polygon.md │ │ ├── polyline.md │ │ └── rectangle.md │ ├── custom │ ├── custom-component.md │ └── folder-component.md │ ├── hooks │ ├── city-search.md │ ├── geolocation.md │ └── weather.md │ ├── introduction │ ├── api.md │ ├── compatible.md │ ├── faq.md │ ├── init.md │ ├── install.md │ ├── introduction.md │ ├── offline-jsapi.md │ ├── ssr.md │ ├── typescript.md │ └── v1tov2.md │ └── other │ └── donation.md ├── ide-api └── component │ ├── vue-amap-extra │ ├── three-gltf.md │ ├── three-layer.md │ ├── three-light-ambient.md │ ├── three-light-directional.md │ ├── three-light-hemisphere.md │ ├── three-light-point.md │ ├── three-light-spot.md │ ├── three-polygon.md │ ├── three-tiles3d.md │ └── three-video.md │ ├── vue-amap-loca │ ├── ambient-light.md │ ├── directional-light.md │ ├── grid-layer.md │ ├── heatmap-layer.md │ ├── hexagon-layer.md │ ├── icon-layer.md │ ├── laser-layer.md │ ├── line-layer.md │ ├── link-layer.md │ ├── loca.md │ ├── point-layer.md │ ├── point-light.md │ ├── polygon-layer.md │ ├── prism-layer.md │ ├── pulse-line-layer.md │ ├── pulse-link-layer.md │ ├── scatter-layer.md │ └── z-marker-layer.md │ └── vue-amap │ ├── amap.md │ ├── control │ ├── control-bar.md │ ├── geolocation.md │ ├── hawk-eye.md │ ├── map-type.md │ ├── scale.md │ ├── search-box.md │ └── tool-bar.md │ ├── infoWindow │ └── info-window.md │ ├── layer │ ├── data │ │ ├── canvas.md │ │ ├── custom-xyz.md │ │ ├── custom.md │ │ ├── district-cluster.md │ │ ├── flexible.md │ │ ├── gl-custom.md │ │ ├── heat-map.md │ │ ├── image.md │ │ ├── labels.md │ │ ├── tiles3d.md │ │ ├── vector.md │ │ └── video.md │ ├── official │ │ ├── buildings.md │ │ ├── default-layer.md │ │ ├── district-layer.md │ │ ├── indoor-map.md │ │ ├── roadNet.md │ │ ├── satellite.md │ │ ├── tile-layer.md │ │ └── traffic.md │ └── standard │ │ ├── mapbox-vector-tile-layer.md │ │ ├── wms.md │ │ └── wmts.md │ ├── marker │ ├── circle-marker.md │ ├── elastic-marker.md │ ├── label-marker.md │ ├── marker-cluster.md │ ├── marker.md │ ├── mass-marks.md │ └── text.md │ ├── util │ └── mouse-tool.md │ └── vector │ ├── bezier-curve.md │ ├── circle.md │ ├── ellipse.md │ ├── geojson.md │ ├── polygon.md │ ├── polyline.md │ └── rectangle.md ├── image ├── weixin.png └── zhifubao.jpg ├── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts ├── .eslintrc.cjs ├── publish-amap-beta.sh ├── publish-amap.sh ├── publish-extra-beta.sh ├── publish-extra.sh ├── publish-loca-beta.sh ├── publish-loca.sh ├── publish-util-beta.sh └── publish-util.sh ├── src ├── vue-amap-extra │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── component.ts │ ├── defaults.ts │ ├── global.d.ts │ ├── index.ts │ ├── package.json │ ├── packages │ │ ├── Three3Dtiles │ │ │ ├── ThreeTiles3d.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeGltf │ │ │ ├── CustomThreeGltf.ts │ │ │ ├── ThreeGltf.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeLayer │ │ │ ├── CSS2DRenderer.js │ │ │ ├── CSS3DRenderer.js │ │ │ ├── CustomThreeLayer.ts │ │ │ ├── ThreeLayer.vue │ │ │ ├── ThreeRenderPass.js │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeLightAmbient │ │ │ ├── ThreeLightAmbient.ts │ │ │ ├── ThreeLightAmbient.vue │ │ │ └── index.ts │ │ ├── ThreeLightDirectional │ │ │ ├── ThreeLightDirectional.ts │ │ │ ├── ThreeLightDirectional.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeLightHemisphere │ │ │ ├── ThreeLightHemisphere.ts │ │ │ ├── ThreeLightHemisphere.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeLightPoint │ │ │ ├── ThreeLightPoint.ts │ │ │ ├── ThreeLightPoint.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreeLightSpot │ │ │ ├── ThreeLightSpot.ts │ │ │ ├── ThreeLightSpot.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreePassCircle │ │ │ ├── CircleSweepPass.ts │ │ │ ├── ThreePassCircle.ts │ │ │ ├── ThreePassCircle.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── ThreePolygon │ │ │ ├── ThreePolygon.ts │ │ │ ├── ThreePolygon.vue │ │ │ ├── Type.ts │ │ │ ├── index.ts │ │ │ └── meshlambert.glsl.js │ │ ├── ThreeVideo │ │ │ ├── ThreeVideo.ts │ │ │ ├── ThreeVideo.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ └── index.ts │ └── utils │ │ ├── colorUtil.ts │ │ └── threeUtil.js ├── vue-amap-loca │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── component.ts │ ├── defaults.ts │ ├── global.d.ts │ ├── index.ts │ ├── mixins │ │ └── useLoca.ts │ ├── package.json │ ├── packages │ │ ├── AmbientLight │ │ │ ├── AmbientLight.vue │ │ │ └── index.ts │ │ ├── DirectionalLight │ │ │ ├── DirectionalLight.vue │ │ │ └── index.ts │ │ ├── GridLayer │ │ │ ├── GridLayer.vue │ │ │ └── index.ts │ │ ├── HeatMapLayer │ │ │ ├── HeatMapLayer.vue │ │ │ └── index.ts │ │ ├── HexagonLayer │ │ │ ├── HexagonLayer.vue │ │ │ └── index.ts │ │ ├── IconLayer │ │ │ ├── IconLayer.vue │ │ │ └── index.ts │ │ ├── LaserLayer │ │ │ ├── LaserLayer.vue │ │ │ └── index.ts │ │ ├── LineLayer │ │ │ ├── LineLayer.vue │ │ │ └── index.ts │ │ ├── LinkLayer │ │ │ ├── LinkLayer.vue │ │ │ └── index.ts │ │ ├── Loca │ │ │ ├── Loca.vue │ │ │ ├── Type.ts │ │ │ └── index.ts │ │ ├── PointLayer │ │ │ ├── PointLayer.vue │ │ │ └── index.ts │ │ ├── PointLight │ │ │ ├── PointLight.vue │ │ │ └── index.ts │ │ ├── PolygonLayer │ │ │ ├── PolygonLayer.vue │ │ │ └── index.ts │ │ ├── PrismLayer │ │ │ ├── PrismLayer.vue │ │ │ └── index.ts │ │ ├── PulseLineLayer │ │ │ ├── PulseLineLayer.vue │ │ │ └── index.ts │ │ ├── PulseLinkLayer │ │ │ ├── PulseLinkLayer.vue │ │ │ └── index.ts │ │ ├── ScatterLayer │ │ │ ├── ScatterLayer.vue │ │ │ └── index.ts │ │ ├── ZMarkerLayer │ │ │ ├── ZMarkerLayer.vue │ │ │ └── index.ts │ │ └── index.ts │ └── utils │ │ └── buildHelper.ts └── vue-amap │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── component.ts │ ├── defaults.ts │ ├── global.d.ts │ ├── hooks │ ├── index.ts │ ├── useCitySearch.ts │ ├── useGeolocation.ts │ └── useWeather.ts │ ├── index.ts │ ├── mixins │ ├── index.ts │ ├── register-component.ts │ ├── useEditor.ts │ └── useRegister.ts │ ├── package.json │ ├── packages │ ├── amap │ │ ├── amap.vue │ │ ├── index.ts │ │ └── props.ts │ ├── control │ │ ├── ControlBar │ │ │ ├── ControlBar.vue │ │ │ └── index.ts │ │ ├── Geolocation │ │ │ ├── Geolocation.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── HawkEye │ │ │ ├── HawkEye.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── MapType │ │ │ ├── MapType.vue │ │ │ └── index.ts │ │ ├── Scale │ │ │ ├── Scale.vue │ │ │ └── index.ts │ │ ├── SearchBox │ │ │ ├── SearchBox.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ │ └── ToolBar │ │ │ ├── ToolBar.vue │ │ │ └── index.ts │ ├── index.ts │ ├── infoWindow │ │ └── InfoWindow │ │ │ ├── InfoWindow.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ ├── layer │ │ ├── data │ │ │ ├── Canvas │ │ │ │ ├── Canvas.vue │ │ │ │ └── index.ts │ │ │ ├── Custom │ │ │ │ ├── Custom.vue │ │ │ │ └── index.ts │ │ │ ├── CustomXyz │ │ │ │ ├── CustomXyz.vue │ │ │ │ ├── index.ts │ │ │ │ └── props.ts │ │ │ ├── DistrictCluster │ │ │ │ ├── DistrictCluster.vue │ │ │ │ ├── addProcess.ts │ │ │ │ └── index.ts │ │ │ ├── Flexible │ │ │ │ ├── Flexible.vue │ │ │ │ └── index.ts │ │ │ ├── GLCustom │ │ │ │ ├── GLCustom.vue │ │ │ │ └── index.ts │ │ │ ├── HeatMap │ │ │ │ ├── HeatMap.vue │ │ │ │ └── index.ts │ │ │ ├── Image │ │ │ │ ├── Image.vue │ │ │ │ └── index.ts │ │ │ ├── Labels │ │ │ │ ├── Labels.vue │ │ │ │ └── index.ts │ │ │ ├── Tiles3D │ │ │ │ ├── Tiles3D.vue │ │ │ │ └── index.ts │ │ │ ├── Vector │ │ │ │ ├── Vector.vue │ │ │ │ └── index.ts │ │ │ └── Video │ │ │ │ ├── Video.vue │ │ │ │ ├── VideoLayer.ts │ │ │ │ └── index.ts │ │ ├── official │ │ │ ├── Buildings │ │ │ │ ├── Buildings.vue │ │ │ │ └── index.ts │ │ │ ├── DefaultLayer │ │ │ │ ├── DefaultLayer.vue │ │ │ │ └── index.ts │ │ │ ├── DistrictLayer │ │ │ │ ├── DistrictLayer.vue │ │ │ │ └── index.ts │ │ │ ├── IndoorMap │ │ │ │ ├── IndoorMap.vue │ │ │ │ └── index.ts │ │ │ ├── RoadNet │ │ │ │ ├── RoadNet.vue │ │ │ │ └── index.ts │ │ │ ├── Satellite │ │ │ │ ├── Satellite.vue │ │ │ │ └── index.ts │ │ │ ├── TileLayer │ │ │ │ ├── TileLayer.vue │ │ │ │ └── index.ts │ │ │ └── Traffic │ │ │ │ ├── Traffic.vue │ │ │ │ └── index.ts │ │ └── standard │ │ │ ├── MapboxVectorTileLayer │ │ │ ├── MapboxVectorTileLayer.vue │ │ │ └── index.ts │ │ │ ├── WMS │ │ │ ├── WMS.vue │ │ │ └── index.ts │ │ │ └── WMTS │ │ │ ├── WMTS.vue │ │ │ └── index.ts │ ├── marker │ │ ├── CircleMarker │ │ │ ├── CircleMarker.vue │ │ │ └── index.ts │ │ ├── ElasticMarker │ │ │ ├── ElasticMarker.vue │ │ │ └── index.ts │ │ ├── LabelMarker │ │ │ ├── LabelMarker.vue │ │ │ └── index.ts │ │ ├── Marker │ │ │ ├── Marker.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ │ ├── MarkerCluster │ │ │ ├── MarkerCluster.vue │ │ │ └── index.ts │ │ ├── MassMarks │ │ │ ├── MassMarks.vue │ │ │ └── index.ts │ │ └── Text │ │ │ ├── Text.vue │ │ │ ├── index.ts │ │ │ └── props.ts │ ├── util │ │ └── MouseTool │ │ │ ├── MouseTool.vue │ │ │ └── index.ts │ └── vector │ │ ├── BezierCurve │ │ ├── BezierCurve.vue │ │ ├── index.ts │ │ └── props.ts │ │ ├── Circle │ │ ├── Circle.vue │ │ ├── index.ts │ │ └── props.ts │ │ ├── Ellipse │ │ ├── Ellipse.vue │ │ ├── index.ts │ │ └── props.ts │ │ ├── GeoJSON │ │ ├── GeoJSON.vue │ │ └── index.ts │ │ ├── Polygon │ │ ├── Polygon.vue │ │ ├── index.ts │ │ └── props.ts │ │ ├── Polyline │ │ ├── Polyline.vue │ │ ├── index.ts │ │ └── props.ts │ │ └── Rectangle │ │ ├── Rectangle.vue │ │ ├── index.ts │ │ └── props.ts │ ├── services │ ├── amap-api-loader.ts │ ├── index.ts │ └── injected-amap-api-instance.ts │ └── utils │ ├── GPSUtil.ts │ ├── buildHelper.ts │ ├── convert-helper.js │ ├── eventHelper.ts │ ├── guid.ts │ ├── index.ts │ ├── make-installer.ts │ └── util.js ├── test ├── .eslintignore ├── .eslintrc.cjs ├── App.vue ├── assets │ ├── china.json │ ├── chongqing.json │ ├── citys.json │ └── logo.png ├── components │ └── Menu.vue ├── env.d.ts ├── index.html ├── main.ts ├── package.json ├── public │ ├── chongqing.js │ ├── citys.js │ ├── events.json │ ├── gltf │ │ ├── car2.gltf │ │ ├── car4.gltf │ │ ├── ferrari.glb │ │ └── sgyj_point_animation.gltf │ ├── hdr │ │ ├── nx.hdr │ │ ├── ny.hdr │ │ ├── nz.hdr │ │ ├── px.hdr │ │ ├── py.hdr │ │ └── pz.hdr │ ├── img │ │ └── qiang.jpeg │ ├── screen.jpeg │ ├── test.mp4 │ ├── test.pbf │ └── zmarker.json ├── router │ └── index.ts ├── views │ ├── InfoWindow.vue │ ├── Map.vue │ ├── hooks │ │ ├── citySearch.vue │ │ ├── geolocation.vue │ │ └── weather.vue │ ├── layer │ │ ├── Canvas.vue │ │ ├── Custom.vue │ │ ├── CustomXyz.vue │ │ ├── DistrictCluster.vue │ │ ├── Flexible.vue │ │ ├── HeatMap.vue │ │ ├── Image.vue │ │ ├── Official.vue │ │ ├── Standard.vue │ │ ├── Tiles3D.vue │ │ └── Video.vue │ ├── loca │ │ ├── Grid.vue │ │ ├── HeatMap.vue │ │ ├── HeatMapBuffer.vue │ │ ├── Hexagon.vue │ │ ├── Icon.vue │ │ ├── Laser.vue │ │ ├── Line.vue │ │ ├── Link.vue │ │ ├── Point.vue │ │ ├── PolygonLayer.vue │ │ ├── PrismLayer.vue │ │ ├── PulseLineLayer.vue │ │ ├── PulseLinkLayer.vue │ │ ├── ScatterLayer.vue │ │ └── ZMarkerLayer.vue │ ├── marker │ │ ├── CircleMarker.vue │ │ ├── ElasticMarker.vue │ │ ├── LabelMarker.vue │ │ ├── Marker.vue │ │ ├── MarkerCluster.vue │ │ ├── MassMarker.vue │ │ └── Text.vue │ ├── three │ │ ├── Gltf.vue │ │ ├── Gltf_Popup.vue │ │ ├── Polygon.vue │ │ ├── ThreeVideo.vue │ │ └── Tiles3d.vue │ ├── util │ │ └── MouseTool.vue │ └── vector │ │ ├── BezierCurve.vue │ │ ├── Circle.vue │ │ ├── Ellipse.vue │ │ ├── GeoJSON.vue │ │ ├── Polygon.vue │ │ ├── Polyline.vue │ │ └── Rectangle.vue └── vite.config.ts ├── tsconfig.base.json ├── tsconfig.build.config.json ├── tsconfig.build.json ├── tsconfig.docs.json ├── tsconfig.json ├── tsconfig.test.json └── typings ├── amap.d.ts ├── env.d.ts ├── shims-vue.d.ts ├── vue-shim.d.ts ├── vue-test-utils.d.ts └── window.d.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = false 8 | insert_final_newline = false 9 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | !.* 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### 使用版本 2 | 请填写使用版本: 3 | 4 | ### 问题描述 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/workflows/vue-amap-docs.yml: -------------------------------------------------------------------------------- 1 | name: vue-amap-docs 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: pnpm/action-setup@v4.0.0 13 | 14 | - name: Use Node.js ${{ matrix.node-version }} 15 | uses: actions/setup-node@v4 16 | with: 17 | node-version: '18' 18 | cache: 'pnpm' 19 | 20 | - name: Build 21 | run: | 22 | pnpm i 23 | pnpm run docs:build 24 | - name: Upload GitHub Pages artifact 25 | uses: peaceiris/actions-gh-pages@v4 26 | with: 27 | personal_token: ${{ secrets.PERSONTOKEN }} 28 | external_repository: yangyanggu/vue-amap-docs 29 | publish_dir: docs/.vuepress/dist 30 | 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build and Release Folders 2 | bin-debug/ 3 | bin-release/ 4 | [Oo]bj/ 5 | [Bb]in/ 6 | 7 | # Other files and folders 8 | .settings/ 9 | 10 | # Executables 11 | *.swf 12 | *.air 13 | *.ipa 14 | *.apk 15 | 16 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` 17 | # should NOT be excluded as they contain compiler settings and other important 18 | # information for Eclipse / Flash Builder. 19 | 20 | dist 21 | node_modules 22 | .idea 23 | *.log 24 | .temp 25 | .cache 26 | dist.zip 27 | _types 28 | es 29 | lib 30 | ide 31 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist = true 2 | link-workspace-packages = false 3 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### @vuemap/vue-amap 2 | [更新日志](./src/vue-amap/CHANGELOG.md) 3 | 4 | ### @vuemap/vue-amap-loca 5 | [更新日志](./src/vue-amap-loca/CHANGELOG.md) 6 | 7 | ### @vuemap/vue-amap-extra 8 | [更新日志](./src/vue-amap-extra/CHANGELOG.md) 9 | 10 | ### @vuemap/vue-amap-util 11 | [更新日志](./src/vue-amap-util/CHANGELOG.md) 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 gyy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /build/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | 'no-console': 'off', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /build/plugins/changeBuildDate.ts: -------------------------------------------------------------------------------- 1 | import {resolve as resolvePath} from "path"; 2 | import fs from 'fs' 3 | import {docRoot} from '../utils/paths' 4 | import config from '../../docs/.vuepress/data/config.json' 5 | export default function (key: string){ 6 | return new Promise((resolve) => { 7 | const date = new Date() 8 | const year = date.getFullYear() 9 | const month = date.getMonth() + 1 10 | const monthStr = month < 10 ? (`0${month}`) : month 11 | const day = date.getDate() 12 | const dayStr = day < 10 ? (`0${day}`) : day 13 | config[key] = `${year}-${monthStr}-${dayStr}` 14 | const path = resolvePath(docRoot, '.vuepress/data/config.json') 15 | fs.writeFile(path,JSON.stringify(config),() => { 16 | resolve() 17 | }) 18 | }) 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /build/plugins/map-alias.ts: -------------------------------------------------------------------------------- 1 | import { EP_PREFIX } from '../utils/constants' 2 | import { getDistPackages } from '../utils/pkg' 3 | import type { Plugin } from 'rollup' 4 | 5 | export async function MapAlias(): Promise { 6 | const pkgs = await getDistPackages() 7 | 8 | return { 9 | name: 'map-alias-plugin', 10 | resolveId(id, importer, options) { 11 | if (!id.startsWith(EP_PREFIX)) return 12 | 13 | let updatedId = id 14 | for (const pkg of pkgs) { 15 | if (id.startsWith(pkg.name)){ 16 | updatedId = updatedId.replace(pkg.name, pkg.dir) 17 | } 18 | } 19 | return this.resolve(id, importer, { skipSelf: true, ...options }) 20 | }, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/plugins/size-reporter.ts: -------------------------------------------------------------------------------- 1 | import { cyan, bold, yellow, green } from 'chalk' 2 | 3 | import type { FileSizeReporter } from 'rollup-plugin-filesize' 4 | 5 | export const reporter: FileSizeReporter = (opt, outputOptions, info) => { 6 | return `${cyan(bold(info.fileName))}: bundle size ${yellow( 7 | info.bundleSize 8 | )} -> minified ${green(info.minSize)}` 9 | } 10 | -------------------------------------------------------------------------------- /build/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const EP_PREFIX = '@vue-map' 2 | export const EP_PKG = '@vuemap/vue-amap' 3 | -------------------------------------------------------------------------------- /build/utils/gulp.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs"; 2 | import type { TaskFunction } from 'gulp'; 3 | 4 | export const withTaskName = (name: string, fn: TaskFunction): TaskFunction => 5 | Object.assign(fn, { displayName: name }); 6 | 7 | export const copyPackageJSON = async (sourceFile: string, destFile: string) => { 8 | const packageJSON = await import(sourceFile); 9 | delete packageJSON.default; 10 | packageJSON['exports']['.']['import'] = './es/index.mjs'; 11 | if(packageJSON['peerDependencies']['@vuemap/vue-amap']){ 12 | packageJSON['peerDependencies']['@vuemap/vue-amap'] = '>=2.1.0'; 13 | } 14 | fs.writeFileSync(destFile,JSON.stringify(packageJSON, undefined, 2),); 15 | }; -------------------------------------------------------------------------------- /build/utils/log.ts: -------------------------------------------------------------------------------- 1 | import process from 'process' 2 | import chalk from 'chalk' 3 | 4 | export function cyan(str: string) { 5 | console.log(chalk.cyan(str)) 6 | } 7 | 8 | export function yellow(str: string) { 9 | console.log(chalk.yellow(str)) 10 | } 11 | 12 | export function green(str: string) { 13 | console.log(chalk.green(str)) 14 | } 15 | 16 | export function red(str: string) { 17 | console.error(chalk.red(str)) 18 | } 19 | 20 | export function errorAndExit(e: Error): never { 21 | red(e.stack ?? e.message) 22 | process.exit(1) 23 | } 24 | -------------------------------------------------------------------------------- /build/utils/paths.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from 'path' 2 | 3 | export const projRoot = resolve(__dirname, '..', '..') 4 | export const docRoot = resolve(projRoot, 'docs') 5 | 6 | export const apiRoot = resolve(projRoot, 'ide-api', 'component') 7 | 8 | export const srcRoot = resolve(projRoot, 'src') 9 | 10 | export const vmRoot = resolve(srcRoot, 'vue-map') 11 | 12 | export const epPackage = resolve(vmRoot, 'package-template.json'); 13 | 14 | /** dist */ 15 | export const buildOutput = resolve(projRoot, 'dist') 16 | 17 | /** dist/vue-amap */ 18 | export const epOutput = resolve(buildOutput, 'vue-amap') 19 | 20 | export const buildTsConfigPath = resolve(projRoot, 'tsconfig.build.json') 21 | 22 | -------------------------------------------------------------------------------- /build/utils/process.ts: -------------------------------------------------------------------------------- 1 | import { spawn } from 'child_process' 2 | import { green } from 'chalk' 3 | import { projRoot } from './paths' 4 | 5 | export const run = async (command: string, cwd: string = projRoot) => 6 | new Promise((resolve, reject) => { 7 | const [cmd, ...args] = command.split(' ') 8 | console.log(`run: ${green(`${cmd} ${args.join(' ')}`)}`) 9 | const app = spawn(cmd, args, { 10 | cwd, 11 | stdio: 'inherit', 12 | shell: process.platform === 'win32', 13 | }) 14 | 15 | const onProcessExit = () => app.kill('SIGHUP') 16 | 17 | app.on('close', (code) => { 18 | process.removeListener('exit', onProcessExit) 19 | 20 | if (code === 0) resolve() 21 | else 22 | reject( 23 | new Error(`Command failed. \n Command: ${command} \n Code: ${code}`) 24 | ) 25 | }) 26 | process.on('exit', onProcessExit) 27 | }) 28 | -------------------------------------------------------------------------------- /build/utils/rollup.ts: -------------------------------------------------------------------------------- 1 | import { getPackageDependencies } from './pkg'; 2 | import { epPackage } from './paths'; 3 | import type { OutputOptions, RollupBuild } from 'rollup'; 4 | 5 | export function writeBundles (bundle: RollupBuild, options: OutputOptions[]) { 6 | return Promise.all(options.map((option) => bundle.write(option))); 7 | } 8 | 9 | export const generateExternal = async (options: { full: boolean, package: string }) => { 10 | return (id: string) => { 11 | const packages: string[] = ['vue', '@vuemap/amap-jsapi-types', '@vuemap/amap-loca-types']; 12 | if (!options.full) { 13 | // dependencies 14 | packages.push('@vue', '@vuemap/vue-amap', ...getPackageDependencies(options.package)); 15 | } 16 | 17 | return [...new Set(packages)].some( 18 | (pkg) => id === pkg || id.startsWith(`${pkg}/`) 19 | ); 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /docs/.vuepress/components/demo/vp-source-code.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 22 | 23 | 34 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/basic-setup.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/basic.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 50 | 51 | 53 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/get-instance-setup.vue: -------------------------------------------------------------------------------- 1 | 19 | 40 | 42 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/get-instance.vue: -------------------------------------------------------------------------------- 1 | 19 | 50 | 52 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/plugin-global.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | 24 | 26 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/amap/plugin-part.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 28 | 29 | 31 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/control-bar.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/geolocation.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/hawk-eye.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/map-type.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/scale.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/search-box.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 42 | 43 | 45 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/control/toolbar.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/hooks/city-search.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 29 | 30 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/hooks/geolocation.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 36 | 37 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/hooks/weather.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 26 | 27 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/data/image.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 36 | 37 | 39 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/data/tiles3d.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 41 | 42 | 44 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/data/vector.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 35 | 36 | 38 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/data/video.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/buildings.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 34 | 35 | 37 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/default.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 23 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/indoor-map.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/road-net.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/satellite.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/tile.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 34 | 35 | 37 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/official/traffic.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/standard/mapbox-vector.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 35 | 36 | 38 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/standard/wms.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 44 | 45 | 47 | -------------------------------------------------------------------------------- /docs/.vuepress/components/examples/layer/standard/wmts.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 44 | 45 | 47 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/back-to-top.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/copy-icon.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/dark.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/element-plus-logo.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/expand.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/external-link-icon.vue: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/github.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/light.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/source-code.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/toggle-button.vue: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /docs/.vuepress/components/icons/translation-icon.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /docs/.vuepress/composables/toggle.ts: -------------------------------------------------------------------------------- 1 | import { isRef, ref } from 'vue'; 2 | 3 | import type { Ref } from 'vue'; 4 | 5 | const isBool = (val: unknown): val is boolean => { 6 | return typeof val === 'boolean'; 7 | }; 8 | 9 | export const useToggle = (getToggled?: Ref) => { 10 | const val = isRef(getToggled) 11 | ? getToggled 12 | : ref(isBool(getToggled) ? getToggled : false); 13 | 14 | return [ 15 | val, 16 | (toggle?: boolean) => { 17 | val.value = isBool(toggle) ? toggle : !val.value; 18 | }, 19 | ] as const; 20 | }; 21 | -------------------------------------------------------------------------------- /docs/.vuepress/data/config.json: -------------------------------------------------------------------------------- 1 | {"amap":"2025-06-09","loca":"2024-06-04","extra":"2024-09-04"} -------------------------------------------------------------------------------- /docs/.vuepress/plugin/registerPlugin.ts: -------------------------------------------------------------------------------- 1 | import {resolve} from 'path' 2 | import {registerComponentsPlugin} from "@vuepress/plugin-register-components"; 3 | import {vpRoot} from '../utils/paths' 4 | 5 | export default registerComponentsPlugin({ 6 | componentsDir: resolve(vpRoot, 'components'), 7 | }); 8 | -------------------------------------------------------------------------------- /docs/.vuepress/plugin/sitemapPlugin.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import fs from 'fs' 3 | import {Readable} from 'stream' 4 | import {SitemapStream, streamToPromise} from 'sitemap' 5 | import {hostname} from '../utils/paths' 6 | import type {Plugin, PluginObject} from '@vuepress/core' 7 | 8 | import type {LinkItem} from 'sitemap' 9 | 10 | export const sitemapPlugin = (): Plugin => { 11 | const pluginObj: PluginObject = { 12 | name: 'sitemap-plugin', 13 | multiple: true, 14 | } 15 | 16 | pluginObj.onGenerated = (app) => { 17 | const pages = app.pages; 18 | const links = [] as LinkItem[]; 19 | pages.forEach(page => { 20 | links.push({ 21 | lang: 'zh-CN', 22 | url: page.path 23 | }) 24 | }) 25 | const stream = new SitemapStream( { hostname } ) 26 | const file = app.dir.dest('sitemap.xml'); 27 | // Return a promise that resolves with your XML string 28 | streamToPromise(Readable.from(links).pipe(stream)).then((data) => 29 | fs.writeFileSync(file, data.toString(), { 30 | encoding: 'utf-8' 31 | }) 32 | ) 33 | } 34 | return pluginObj; 35 | } 36 | -------------------------------------------------------------------------------- /docs/.vuepress/public/css/global.css: -------------------------------------------------------------------------------- 1 | .map-page-container{ 2 | height: 300px; 3 | } 4 | .toolbar{ 5 | padding: 6px 12px; 6 | background: #dcdcdc; 7 | } 8 | .toolbar>button{ 9 | margin-right: 8px; 10 | } 11 | -------------------------------------------------------------------------------- /docs/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/nx.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/nx.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/ny.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/ny.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/nz.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/nz.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/px.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/px.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/py.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/py.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/hdr/pz.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/hdr/pz.hdr -------------------------------------------------------------------------------- /docs/.vuepress/public/images/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/logo.ico -------------------------------------------------------------------------------- /docs/.vuepress/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/logo.png -------------------------------------------------------------------------------- /docs/.vuepress/public/images/qiang.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/qiang.jpeg -------------------------------------------------------------------------------- /docs/.vuepress/public/images/screen.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/screen.jpeg -------------------------------------------------------------------------------- /docs/.vuepress/public/images/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/weixin.png -------------------------------------------------------------------------------- /docs/.vuepress/public/images/youpaiyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/youpaiyun.png -------------------------------------------------------------------------------- /docs/.vuepress/public/images/zhifubao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/docs/.vuepress/public/images/zhifubao.jpg -------------------------------------------------------------------------------- /docs/.vuepress/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: * 3 | -------------------------------------------------------------------------------- /docs/.vuepress/theme/client.js: -------------------------------------------------------------------------------- 1 | import { defineClientConfig } from '@vuepress/client' 2 | import Layout from './layouts/Layout.vue' 3 | 4 | export default defineClientConfig({ 5 | layouts: { 6 | Layout, 7 | }, 8 | }) -------------------------------------------------------------------------------- /docs/.vuepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import { defaultTheme } from '@vuepress/theme-default' 3 | import type { Theme } from '@vuepress/core' 4 | import type { DefaultThemeOptions } from '@vuepress/theme-default' 5 | 6 | export const localTheme = (options: DefaultThemeOptions): Theme => { 7 | return { 8 | name: 'vuepress-theme-local', 9 | extends: defaultTheme(options), 10 | // 主题的客户端配置文件的路径 11 | clientConfigFile: path.resolve(__dirname, 'client.js').replaceAll('\\', '/'), 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/.vuepress/utils/paths.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | 3 | export const vpRoot = path.resolve(__dirname, '..') 4 | export const docRoot = path.resolve(vpRoot, '..') 5 | export const projRoot = path.resolve(docRoot, '..') 6 | export const hostname = 'https://vue-amap.guyixi.cn'; 7 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vue-map/docs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "dev": "vuepress dev .", 7 | "build": "vuepress build ." 8 | }, 9 | "author": "", 10 | "license": "MIT", 11 | "dependencies": { 12 | "@vueuse/core": "10.2.1", 13 | "clipboard-copy": "4.0.1", 14 | "@vuemap/vue-amap": "workspace:*", 15 | "@vuemap/vue-amap-loca": "workspace:*", 16 | "@vuemap/vue-amap-extra": "workspace:*", 17 | "three": "0.143.0", 18 | "vue": "3.4.15" 19 | }, 20 | "devDependencies": { 21 | "@types/markdown-it": "^13.0.7", 22 | "@vuepress/plugin-docsearch": "2.0.0-rc.41", 23 | "@vuepress/plugin-register-components": "2.0.0-rc.37", 24 | "@vuepress/theme-default": "2.0.0-rc.41", 25 | "@vuepress/client": "2.0.0-rc.14", 26 | "escape-html": "1.0.3", 27 | "markdown-it": "^14.1.0", 28 | "markdown-it-container": "^4.0.0", 29 | "prismjs": "1.29.0", 30 | "vuepress": "2.0.0-rc.14", 31 | "sitemap": "^7.0.0", 32 | "unplugin-vue-components": "0.25.2", 33 | "unplugin-auto-import": "0.16.7", 34 | "@vuepress/bundler-vite": "2.0.0-rc.14" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/zh-cn/base/get-amap-instance.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 获取高德地图实例 3 | description: vue-amap获取高德地图实例可以通过init事件或者通过ref调用地图组件的$$getInstance方法获取实例,同时提供了普通示例和setup示例 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 获取地图实例, init事件, ref, 地图ts类型 8 | --- 9 | # 地图 10 | 11 | 获取地图实例方式有两种:
12 | 1、通过init事件
13 | 2、通过ref获取地图组件对象,然后调用$$getInstance方法
14 | 15 | 详细使用请查看下面的示例,可以在控制台看出打印效果 16 | 17 | ## 基础示例 18 | 19 | ### 普通示例 20 | ::: demo 21 | examples/amap/get-instance 22 | ::: 23 | 24 | ### Setup示例 25 | ::: demo 26 | examples/amap/get-instance-setup 27 | ::: 28 | -------------------------------------------------------------------------------- /docs/zh-cn/base/plugin.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 地图插件 3 | description: 地图插件示例 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 高德地图插件, 全局加载, 局部加载, 懒加载 8 | --- 9 | # 地图插件 10 | 11 | 地图插件示例,提供全局加载插件和局部加载插件的两种示例 12 | 13 | ## 全局加载插件 14 | 15 | 全局加载插件需要在调用`initAMapApiLoader`的时候传入`plugins`参数。 16 | ```ts 17 | import {initAMapApiLoader} from '@vuemap/vue-amap'; 18 | initAMapApiLoader({ 19 | key: 'YOUR_KEY', 20 | plugins: ['AMap.HawkEye'] 21 | }) 22 | ``` 23 | 24 | 全局加载完成后可以在地图的`init`事件中直接使用插件 25 | 26 | #### 全局加载示例 27 | ::: demo 28 | examples/amap/plugin-global 29 | ::: 30 | 31 | ## 局部加载插件 32 | 33 | 局部加载是调用地图的`plugin`方法来加载插件 34 | 35 | #### 局部加载示例 36 | ::: demo 37 | examples/amap/plugin-part 38 | ::: 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/zh-cn/component/control/control-bar.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 地图控制 3 | description: AMap.ControlBar组合了旋转、倾斜、复位在内的地图控件 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 地图控制, AMap.ControlBar, 旋转, 倾斜 8 | --- 9 | # 地图控制插件 (AMap.ControlBar) 10 | 组合了旋转、倾斜、复位在内的地图控件 11 | 12 | ::: tip 13 | 来源 ```@vuemap/vue-amap``` 组件库 14 | ::: 15 | 16 | ## 基础示例 17 | 18 | ::: demo 19 | examples/control/control-bar 20 | ::: 21 | 22 | ## 静态属性 23 | 仅且可以初始化配置,不支持响应式。 24 | 25 | 名称 | 类型 | 说明 26 | ---|---|---| 27 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 28 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 29 | showControlButton | Boolean | 是否显示倾斜、旋转按钮。默认为 true 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 34 | 支持响应式。 35 | 36 | 名称 | 类型 | 说明 37 | ---|---|---| 38 | visible | Boolean | 是否显示,默认true 39 | 40 | 41 | ## ref 可用方法 42 | 提供无副作用的同步帮助方法 43 | 44 | 函数 | 返回 | 说明 45 | ---|---|---| 46 | $$getInstance() | AMap.ControlBar | 获取实例 47 | 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | show | | 显示时触发此事件 54 | hide | | 隐藏时触发此事件 55 | -------------------------------------------------------------------------------- /docs/zh-cn/component/control/map-type.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 地图类型切换 3 | description: AMap.MapType地图类型切换插件。用户通过该插件进行地图切换 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 地图类型切换, AMap.MapType, 卫星图, 矢量图, 路网图 8 | --- 9 | # 地图类型切换插件 (AMap.MapType) 10 | 地图类型切换插件。用户通过该插件进行地图切换。 11 | 12 | ::: tip 13 | 来源 ```@vuemap/vue-amap``` 组件库 14 | ::: 15 | 16 | ## 基础示例 17 | 18 | ::: demo 19 | examples/control/map-type 20 | ::: 21 | 22 | ## 静态属性 23 | 仅且可以初始化配置,不支持响应式。 24 | 25 | 名称 | 类型 | 说明 26 | ---|---|---| 27 | defaultType | Number | 初始化默认图层类型。 取值为0:默认底图 取值为1:卫星图 默认值:0 28 | showTraffic | Boolean | 叠加实时交通图层 默认值:false 29 | showRoad | Boolean | 叠加路网图层 默认值:false 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 34 | 支持响应式。 35 | 36 | 名称 | 类型 | 说明 37 | ---|---|---| 38 | visible | Boolean | 是否显示,默认true 39 | 40 | 41 | ## ref 可用方法 42 | 提供无副作用的同步帮助方法 43 | 44 | 函数 | 返回 | 说明 45 | ---|---|---| 46 | $$getInstance() | AMap.MapType | 获取实例 47 | 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | show | | 显示时触发此事件 54 | hide | | 隐藏时触发此事件 55 | -------------------------------------------------------------------------------- /docs/zh-cn/component/control/scale.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 比例尺 3 | description: AMap.Scale位于地图左下角,用户可控制其显示与隐藏。继承自 AMap.Control 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 比例尺插件, AMap.Scale, 地图比例尺, 比例尺 8 | --- 9 | # 比例尺插件 (AMap.Scale) 10 | 位于地图右下角,用户可控制其显示与隐藏。继承自 AMap.Control 11 | 12 | ::: tip 13 | 来源 ```@vuemap/vue-amap``` 组件库 14 | ::: 15 | 16 | ## 基础示例 17 | 18 | ::: demo 19 | examples/control/scale 20 | ::: 21 | 22 | ## 静态属性 23 | 仅且可以初始化配置,不支持响应式。 24 | 25 | 名称 | 类型 | 说明 26 | ---|---|---| 27 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 28 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 29 | animateEnable | Array | 相对于地图容器左上角的偏移量,正数代表向右下偏移。默认为AMap.Pixel(10,10) 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 34 | 支持响应式。 35 | 36 | 名称 | 类型 | 说明 37 | ---|---|---| 38 | visible | Boolean | 是否显示,默认true 39 | 40 | 41 | ## ref 可用方法 42 | 提供无副作用的同步帮助方法 43 | 44 | 函数 | 返回 | 说明 45 | ---|---|---| 46 | $$getInstance() | AMap.Scale | 获取实例 47 | 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | show | | 显示时触发此事件 54 | hide | | 隐藏时触发此事件 55 | -------------------------------------------------------------------------------- /docs/zh-cn/component/control/tool-bar.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 地图操作工具 3 | description: AMap.ToolBar地图操作工具条插件。可支持视野级别缩放等操作。继承自 AMap.Control 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 地图操作工具, AMap.ToolBar, 位置定位, 方向导航, 视野级别缩放 8 | --- 9 | # 地图操作工具条插件 (AMap.ToolBar) 10 | 地图操作工具条插件。可支持方向导航、位置定位、视野级别缩放、视野级别选择等操作。继承自 AMap.Control 11 | 12 | ::: tip 13 | 来源 ```@vuemap/vue-amap``` 组件库 14 | ::: 15 | 16 | ## 基础示例 17 | 18 | ::: demo 19 | examples/control/toolbar 20 | ::: 21 | 22 | ## 静态属性 23 | 仅且可以初始化配置,不支持响应式。 24 | 25 | 名称 | 类型 | 说明 26 | ---|---|---| 27 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 28 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 29 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 30 | 31 | ## 动态属性 32 | 33 | 支持响应式。 34 | 35 | 名称 | 类型 | 说明 36 | ---|---|---| 37 | visible | Boolean | 是否显示,默认true 38 | 39 | 40 | ## ref 可用方法 41 | 提供无副作用的同步帮助方法 42 | 43 | 函数 | 返回 | 说明 44 | ---|---|---| 45 | $$getInstance() | AMap.ToolBar | 获取实例 46 | 47 | 48 | ## 事件 49 | 50 | 事件 | 参数 | 说明 51 | ---|---|---| 52 | show | | 显示时触发此事件 53 | hide | | 隐藏时触发此事件 54 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/data/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 自定义图层 3 | description: AMap.CustomLayer 自定义图层是一种完全由开发者来指定绘制方法的图层 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 自定义图层, AMap.CustomLayer 8 | --- 9 | 10 | # 自定义图层 (AMap.CustomLayer) 11 | 自定义图层是一种完全由开发者来指定绘制方法的图层 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/data/custom 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | canvas | HTMLElement | canvas 对象,必填 30 | render | Function | 绘制函数,初始化完成时候,开发者需要给该图层设定render方法,该方法需要实现图层的绘制,API会在合适的时机自动调用该方法 31 | alwaysRender | Boolean | 是否主动,默认 false 32 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 33 | 34 | ## 动态属性 35 | 支持响应式。 36 | 37 | 名称 | 类型 | 说明 38 | ---|---|---| 39 | zooms | Array | 支持的缩放级别范围,默认范围 [2-20] 40 | visible | Boolean | 是否显示,默认 true 41 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 42 | opacity | Number | 透明度,默认 1 43 | 44 | ## ref 可用方法 45 | 提供无副作用的同步帮助方法 46 | 47 | 函数 | 返回 | 说明 48 | ---|---|---| 49 | $$getInstance() | AMap.CustomLayer | 获取实例 50 | 51 | ## 事件 52 | 53 | 事件 | 参数 | 说明 54 | ---|---|---| 55 | init | AMap.CustomLayer | 实例初始化结束 56 | 57 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/data/image.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 图片图层 3 | description: AMap.ImageLayer 图片图层类,用户可以将一张静态图片作为图层添加在地图上,图片图层会随缩放级别而自适应缩放 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 图片图层, AMap.ImageLayer, 静态图片 8 | --- 9 | 10 | # 图片图层 (AMap.ImageLayer) 11 | 图片图层类,用户可以将一张静态图片作为图层添加在地图上,图片图层会随缩放级别而自适应缩放。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/data/image 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | 30 | ## 动态属性 31 | 支持响应式。 32 | 33 | 名称 | 类型 | 说明 34 | ---|---|---| 35 | url | String | 图片地址链接 36 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 37 | bounds | Array, AMap.Bounds | 图片的范围大小经纬度,如果传递数字数组类型: [minlng,minlat,maxlng,maxlat] 38 | visible | Boolean | 是否显示,默认 true 39 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:6 40 | opacity | Number | 透明度,默认 1 41 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 42 | 43 | ## ref 可用方法 44 | 提供无副作用的同步帮助方法 45 | 46 | 函数 | 返回 | 说明 47 | ---|---|---| 48 | $$getInstance() | AMap.ImageLayer | 获取实例 49 | 50 | ## 事件 51 | 52 | 事件 | 参数 | 说明 53 | ---|---|---| 54 | init | AMap.ImageLayer | 实例初始化结束 55 | complete | | 加载完成事件 56 | 57 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/data/vector.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 矢量标记图层 3 | description: 使用 AMap.VectorLayer 矢量图层,可以将点线面统一管理 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 矢量标记图层, AMap.VectorLayer, 矢量图形 8 | --- 9 | 10 | # 矢量标记图层 (AMap.VectorLayer) 11 | 矢量标记图层。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/data/vector 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 30 | 31 | ## 动态属性 32 | 支持响应式。 33 | 34 | 名称 | 类型 | 说明 35 | ---|---|---| 36 | visible | Boolean | 是否显示,默认 true 37 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 38 | 39 | ## ref 可用方法 40 | 提供无副作用的同步帮助方法 41 | 42 | 函数 | 返回 | 说明 43 | ---|---|---| 44 | $$getInstance() | AMap.VectorLayer | 获取实例 45 | 46 | ## 事件 47 | 48 | 事件 | 参数 | 说明 49 | ---|---|---| 50 | init | AMap.VectorLayer | 实例初始化结束 51 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/official/default-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 默认图层 3 | --- 4 | 5 | # 默认图层 (AMap.createDefaultLayer) 6 | 7 | ::: tip 8 | 来源 ```@vuemap/vue-amap``` 组件库 9 | ::: 10 | 11 | ## 基础示例 12 | 13 | ::: demo 14 | examples/layer/official/default 15 | ::: 16 | 17 | 18 | ## 静态属性 19 | 仅且可以初始化配置,不支持响应式。 20 | 21 | 名称 | 类型 | 说明 22 | ---|---|---| 23 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 24 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 25 | 26 | ## 动态属性 27 | 支持响应式。 28 | 29 | 名称 | 类型 | 说明 30 | ---|---|---| 31 | visible | Boolean | 是否可见,默认为true。 32 | zIndex | Number | 默认zIndex:0 33 | opacity | Number | 透明度 34 | 35 | ## ref 可用方法 36 | 提供无副作用的同步帮助方法 37 | 38 | 函数 | 返回 | 说明 39 | ---|---|---| 40 | 41 | 42 | ## 事件 43 | 44 | 事件 | 参数 | 说明 45 | ---|---|---| 46 | init | | 实例初始化结束 47 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/official/indoor-map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 室内图层 3 | description: AMap.IndoorMap 室内图层,用于在适当级别展示室内地图,并提供显示商铺tip、切换楼层等功能 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 室内图层, AMap.IndoorMap 8 | --- 9 | 10 | # 室内图层 (AMap.IndoorMap) 11 | 室内图层,用于在适当级别展示室内地图,并提供显示商铺tip、切换楼层等功能。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/official/indoor-map 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | cursor | String | 指定鼠标悬停到店铺面时的鼠标样式 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 支持响应式。 34 | 35 | 名称 | 类型 | 说明 36 | ---|---|---| 37 | visible | Boolean | 是否显示,默认 true 38 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 39 | opacity | Number | 透明度,默认 1 40 | hideFloorBar | Boolean | 是否隐藏楼层切换控件,默认值:false 41 | 42 | ## ref 可用方法 43 | 提供无副作用的同步帮助方法 44 | 45 | 函数 | 返回 | 说明 46 | ---|---|---| 47 | $$getInstance() | AMap.IndoorMap | 获取实例 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | init | AMap.IndoorMap | 实例初始化结束 54 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/official/roadNet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 路网图层 3 | description: AMap.TileLayer.RoadNet 路网图层,展示道路信息 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 路网图层, AMap.TileLayer.RoadNet 8 | --- 9 | 10 | # 路网图层 (AMap.TileLayer.RoadNet) 11 | 路网图层,展示道路信息。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/official/road-net 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 支持响应式。 34 | 35 | 名称 | 类型 | 说明 36 | ---|---|---| 37 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 38 | visible | Boolean | 是否显示,默认 true 39 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 40 | opacity | Number | 透明度,默认 1 41 | 42 | ## ref 可用方法 43 | 提供无副作用的同步帮助方法 44 | 45 | 函数 | 返回 | 说明 46 | ---|---|---| 47 | $$getInstance() | AMap.TileLayer.RoadNet | 获取实例 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | init | AMap.TileLayer.RoadNet | 实例初始化结束 54 | complete | | 图块切片加载完成事件 55 | -------------------------------------------------------------------------------- /docs/zh-cn/component/layer/official/satellite.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 卫星图层 3 | description: AMap.TileLayer.Satellite 卫星影像图层 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 卫星图层, AMap.TileLayer.Satellite 8 | --- 9 | 10 | # 卫星图层 (AMap.TileLayer.Satellite) 11 | 卫星图层类,继承自TileLayer。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/layer/official/satellite 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---|---| 29 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 支持响应式。 34 | 35 | 名称 | 类型 | 说明 36 | ---|---|---| 37 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 38 | visible | Boolean | 是否显示,默认 true 39 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 40 | opacity | Number | 透明度,默认 1 41 | 42 | ## ref 可用方法 43 | 提供无副作用的同步帮助方法 44 | 45 | 函数 | 返回 | 说明 46 | ---|---|---| 47 | $$getInstance() | AMap.TileLayer.Satellite | 获取实例 48 | 49 | ## 事件 50 | 51 | 事件 | 参数 | 说明 52 | ---|---|---| 53 | init | AMap.TileLayer.Satellite | 实例初始化结束 54 | complete | | 图块切片加载完成事件 55 | 56 | -------------------------------------------------------------------------------- /docs/zh-cn/component/loca/ambient-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 环境光 3 | description: 环境光,对于可以接受光照的图层(PolygonLayer 等)会增加环境光的影响。环境光只能有一个,多余的会被忽略 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 环境光, Loca.AmbientLight 8 | --- 9 | 10 | # 环境光 (Loca.AmbientLight) 11 | 环境光,对于可以接受光照的图层(PolygonLayer 等)会增加环境光的影响。环境光只能有一个,多余的会被忽略 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-loca``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/loca/ambient-light 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 26 | 名称 | 类型 | 说明 27 | ---|---|---| 28 | color | String | 环境光颜色 29 | intensity | Number | 环境光强度 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## ref 可用方法 33 | 提供无副作用的同步帮助方法 34 | 35 | 函数 | 返回 | 说明 36 | ---|---|---| 37 | $$getInstance() | Loca.AmbientLight | 获取实例 38 | 39 | ## 事件 40 | 41 | 事件 | 参数 | 说明 42 | ---|---|---| 43 | init | Loca.AmbientLight | 实例 44 | -------------------------------------------------------------------------------- /docs/zh-cn/component/loca/directional-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 平行光 3 | description: 平行光,对于可以接受光照的图层(PolygonLayer 等)会增加平行光的影响 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 平行光, Loca.DirectionalLight, 太阳光照 8 | --- 9 | 10 | # 平行光 (Loca.DirectionalLight) 11 | 平行光,对于可以接受光照的图层(PolygonLayer 等)会增加平行光的影响。平行光一般用来模拟太阳的光照。 它的方向由 position 射向 target。position和target的坐标是一个位置加 z 值(单位米)高度决定。比如: [1, 1, 1000] 代表x:1, y:1, 高度1000米。 如果模拟一个从正南方向的平行光,可以设置target: [0,0,0], position: [0,-1,0] 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-loca``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/loca/directional-light 21 | ::: 22 | 23 | ## 静态属性 24 | 25 | 名称 | 类型 | 说明 26 | ---|---------------|---| 27 | color | String | 平行光颜色 28 | intensity | Number | 平行光强度 29 | position | `Array` | 坐标位置 30 | target | `Array` | 光射向的目标位置 31 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 32 | 33 | ## ref 可用方法 34 | 提供无副作用的同步帮助方法 35 | 36 | 函数 | 返回 | 说明 37 | ---|---|---| 38 | $$getInstance() | Loca.DirectionalLight | 获取实例 39 | 40 | ## 事件 41 | 42 | 事件 | 参数 | 说明 43 | ---|---|---| 44 | init | Loca.DirectionalLight | 实例 45 | -------------------------------------------------------------------------------- /docs/zh-cn/component/loca/loca.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Loca 3 | description: Loca图层的外部容器 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: loca, 高德Loca 8 | --- 9 | 10 | # Loca 11 | Loca图层的外部容器 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-loca``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/loca/loca 21 | ::: 22 | 23 | 24 | ## 静态属性 25 | 仅且可以初始化配置,不支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|---------|---| 29 | eventOptions | Object `{hitFirst: true}` | 事件属性,hitFirst是设置是否在选择到第一个要素后停止选择,用于事件数据选取,默认true 30 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 31 | 32 | ## 动态属性 33 | 支持响应式。 34 | 35 | 名称 | 类型 | 说明 36 | ---|---|---| 37 | 38 | ## ref 可用方法 39 | 提供无副作用的同步帮助方法 40 | 41 | 函数 | 返回 | 说明 42 | ---|---|---| 43 | $$getInstance() | Loca | 获取实例 44 | 45 | ## 事件 46 | 47 | 事件 | 参数 | 说明 48 | ---|--------------------|---| 49 | init | Loca | 实例 50 | click | \[Feature\], event | 当点击到标号时返回对应的feature数组,无数据时返回空数组 51 | mousemove | \[Feature\], event | 当鼠标移动滑过标号时返回对应的feature数组,无数据时返回空数组 52 | rightclick | \[Feature\], event | 鼠标右击时返回对应的feature数组,无数据时返回空数组 53 | -------------------------------------------------------------------------------- /docs/zh-cn/component/loca/point-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 点光 3 | description: 点光,对于可以接受光照的图层(PolygonLayer 等)会增加点光的影响 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 点光, Loca.PointLight 8 | --- 9 | 10 | # 点光 (Loca.PointLight) 11 | 点光,对于可以接受光照的图层(PolygonLayer 等)会增加点光的影响。点光源通常用来突出展示场景中的某些物体。 它的位置和平行光不太一样,x和y是地图上的经纬度位置,z是高度米,比如北京上空一万米的位置放一个点光源:position: [116.39079, 39.90624, 10000]。 光照的distance代表光能照射的最远距离是多少 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-loca``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/loca/point-light 21 | ::: 22 | 23 | ## 静态属性 24 | 25 | 名称 | 类型 | 说明 26 | ---|---|---| 27 | color | String | 点光颜色 28 | intensity | Number | 光照强度 29 | position | `Array` | 点光位置 30 | distance | Number | 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失 31 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 32 | 33 | ## ref 可用方法 34 | 提供无副作用的同步帮助方法 35 | 36 | 函数 | 返回 | 说明 37 | ---|---|---| 38 | $$getInstance() | Loca.PointLight | 获取实例 39 | 40 | ## 事件 41 | 42 | 事件 | 参数 | 说明 43 | ---|---|---| 44 | init | Loca.PointLight | 实例 45 | -------------------------------------------------------------------------------- /docs/zh-cn/component/three/three-light-ambient.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 环境光 3 | description: 环境光会均匀的照亮场景中的所有物体 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: AmbientLight, 环境光 8 | --- 9 | 10 | # 环境光 11 | 环境光会均匀的照亮场景中的所有物体 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-extra``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/three/three-gltf 21 | ::: 22 | 23 | 24 | ## 动态属性 25 | 支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|--------------------------------------------|---| 29 | color | String | 环境光颜色,可以是rgba,或者red之类的,默认#ffffff 30 | intensity | Number | 光照的强度。缺省值为 1 31 | 32 | ## ref 可用方法 33 | 提供无副作用的同步帮助方法 34 | 35 | 函数 | 返回 | 说明 36 | ---|-------|---| 37 | $$getInstance() | AmbientLight | 获取实例 38 | 39 | ## 事件 40 | 41 | 事件 | 参数 | 说明 42 | ---|---|---| 43 | init | AmbientLight | 实例初始化结束 44 | 45 | -------------------------------------------------------------------------------- /docs/zh-cn/component/three/three-light-directional.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 平行光 3 | description: 平行光是沿着特定方向发射的光 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 平行光, DirectionalLight 8 | --- 9 | 10 | # 平行光 11 | 平行光是沿着特定方向发射的光。这种光的表现像是无限远,从它发出的光线都是平行的。常常用平行光来模拟太阳光 的效果; 太阳足够远,因此我们可以认为太阳的位置是无限远,所以我们认为从太阳发出的光线也都是平行的。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-extra``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/three/three-gltf 21 | ::: 22 | 23 | 24 | ## 动态属性 25 | 支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|--------------------------------------------|---| 29 | color | String | 环境光颜色,可以是rgba,或者red之类的,默认#ffffff 30 | intensity | Number | 光照的强度。缺省值为 1 31 | position | {x:number,y:number,z:number} | 灯光位置 32 | target | Object3D | 物体,配置后,平行光将跟着物体 33 | 34 | ## ref 可用方法 35 | 提供无副作用的同步帮助方法 36 | 37 | 函数 | 返回 | 说明 38 | ---|-------|---| 39 | $$getInstance() | ThreeLightDirectional | 获取实例 40 | 41 | ## 事件 42 | 43 | 事件 | 参数 | 说明 44 | ---|---|---| 45 | init | ThreeLightDirectional | 实例初始化结束 46 | 47 | -------------------------------------------------------------------------------- /docs/zh-cn/component/three/three-light-hemisphere.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 半球光 3 | description: 光源直接放置于场景之上,光照颜色从天空光线颜色渐变到地面光线颜色 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 半球光, HemisphereLight 8 | --- 9 | 10 | # 半球光 11 | 光源直接放置于场景之上,光照颜色从天空光线颜色渐变到地面光线颜色。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-extra``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/three/three-gltf 21 | ::: 22 | 23 | 24 | ## 动态属性 25 | 支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|--------------------------------------------|---| 29 | color | String | 天空中发出光线的颜色。 默认 #ffffff 30 | broundColor | String | 地面发出光线的颜色。 默认 #ffffff 31 | intensity | Number | 光照的强度。缺省值为 1 32 | position | {x:number,y:number,z:number} | 灯光位置 33 | 34 | ## ref 可用方法 35 | 提供无副作用的同步帮助方法 36 | 37 | 函数 | 返回 | 说明 38 | ---|-------|---| 39 | $$getInstance() | ThreeLightHemisphere | 获取实例 40 | 41 | ## 事件 42 | 43 | 事件 | 参数 | 说明 44 | ---|---|---| 45 | init | ThreeLightHemisphere | 实例初始化结束 46 | 47 | -------------------------------------------------------------------------------- /docs/zh-cn/component/three/three-light-point.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 点光源 3 | description: 从一个点向各个方向发射的光源。一个常见的例子是模拟一个灯泡发出的光 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 点光源, PointLight 8 | --- 9 | 10 | # 点光源 11 | 从一个点向各个方向发射的光源。一个常见的例子是模拟一个灯泡发出的光。 12 | 13 | ::: tip 14 | 来源 ```@vuemap/vue-amap-extra``` 组件库 15 | ::: 16 | 17 | ## 基础示例 18 | 19 | ::: demo 20 | examples/three/three-gltf 21 | ::: 22 | 23 | 24 | ## 动态属性 25 | 支持响应式。 26 | 27 | 名称 | 类型 | 说明 28 | ---|--------------------------------------------|---| 29 | color | String | 环境光颜色,可以是rgba,或者red之类的,默认#ffffff 30 | intensity | Number | 光照的强度。缺省值为 1 31 | distance | Number | 这个距离表示从光源到光照强度为0的位置。 当设置为0时,光永远不会消失(距离无穷大)。缺省值 0 32 | decay | Number | 沿着光照距离的衰退量。缺省值 1 33 | position | {x:number,y:number,z:number} | 灯光位置 34 | 35 | ## ref 可用方法 36 | 提供无副作用的同步帮助方法 37 | 38 | 函数 | 返回 | 说明 39 | ---|-------|---| 40 | $$getInstance() | ThreeLightPoint | 获取实例 41 | 42 | ## 事件 43 | 44 | 事件 | 参数 | 说明 45 | ---|---|---| 46 | init | ThreeLightPoint | 实例初始化结束 47 | 48 | -------------------------------------------------------------------------------- /docs/zh-cn/hooks/city-search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: IP定位获取当前城市信息 3 | description: AMap.CitySearch 根据IP定位获取当前城市信息 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 城市定位, AMap.CitySearch, 城市定位Hooks 8 | --- 9 | # IP定位插件 (AMap.CitySearch) 10 | 如果不需要获取精确的位置,只需要城市级别的定位信息,推荐使用AMap.CitySearch插件,AMap.CitySearch插件获取所在城市相比通过浏览器定位的方式也更快捷. 11 | 12 | ::: tip 13 | 来源 ```@vuemap/vue-amap``` 组件库 14 | ::: 15 | 16 | ## 基础示例 17 | 18 | ::: demo 19 | examples/hooks/city-search 20 | ::: 21 | 22 | ## 返回的函数 23 | 函数 | 返回 | 说明 24 | ---|--------------------------------------|---| 25 | getLocalCity() | Promise\ | 获取当前城市定位信息 26 | 27 | -------------------------------------------------------------------------------- /docs/zh-cn/hooks/weather.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 天气查询服务 3 | description: AMap.Weather 天气查询服务 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 天气查询服务,天气查询Hooks, AMap.Weather 8 | --- 9 | # 天气查询插件 (AMap.Weather) 10 | 天气查询服务(AMAP.Weather)是 LBS 基础服务之一,地图 JS API 提供了两种查询服务: 11 | 12 | * 实时天气 13 | * 天气预报 14 | 15 | ::: tip 16 | 来源 ```@vuemap/vue-amap``` 组件库 17 | ::: 18 | 19 | ## 基础示例 20 | 21 | ::: demo 22 | examples/hooks/weather 23 | ::: 24 | 25 | ## 返回的函数 26 | 函数 | 返回 | 说明 27 | ---|--------------------------------------|---| 28 | getLive() | Promise\ | 通过城市名称、区域编码(如杭州市、330100),查询目标城市/区域的实时天气状况 29 | getForecast() | Promise\ | 通过城市名称、区域编码(如北京市、110000),查询目标城市/区域的天气预报状况。 30 | 31 | -------------------------------------------------------------------------------- /docs/zh-cn/introduction/install.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 安装 3 | description: 组件安装方式提供了npm和CDN两种方法 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 组件安装, npm, CDN 8 | --- 9 | 10 | # 安装 11 | 12 | --- 13 | 14 | ## npm 安装 15 | 16 | 推荐 npm 安装。 17 | 18 | ``` 19 | // 安装核心库 20 | npm install @vuemap/vue-amap --save 21 | 22 | // 安装loca库 23 | npm install @vuemap/vue-amap-loca --save 24 | 25 | // 安装扩展库 26 | npm install @vuemap/vue-amap-extra --save 27 | ``` 28 | 29 | ## CDN 30 | 31 | 目前可通过 [https://cdn.jsdelivr.net/npm/@vuemap/vue-amap](https://cdn.jsdelivr.net/npm/@vuemap/vue-amap/dist/index.min.js) 获取最新版本的资源。 32 | 33 | ```html 34 | 35 | 36 | 37 | 38 | ``` 39 | -------------------------------------------------------------------------------- /docs/zh-cn/introduction/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 简介 3 | description: 简介 4 | head: 5 | - - meta 6 | - name: keywords 7 | content: 简介, 分包 8 | --- 9 | 10 | # 简介 11 | 12 | ::: warning 13 | @vuemap/vue-amap 2.0版本以作为默认版本存在,并且原1.0包拆分为三个组件库,灵活使用。 14 | ::: 15 | --- 16 | 17 | ## 为什么升级2.0 18 | 19 | 不管是0.x版本还是1.0版本,在开发初期都没有考虑后续扩展、包体积等问题,导致在扩展功能时,依赖包的安装越来越大,且在使用```initAMapApiLoader```加载高德地图JS文件时默认加载了loca库,这就导致页面初始化时等待时间会变长。 20 | 为了解决这几个核心问题,原``@vuemap/vue-amap``库被拆分为三个库,核心库保留原名,新增加``@vuemap/vue-amap-loca``库用于提供loca相关组件,增加``@vuemap/vue-amap-extra``提供扩展组件,主要用于提供扩展的threejs相关组件。 21 | 22 | 23 | ## 怎么从1.x升级到2.x 24 | 25 | 从1.x升级到2.x请看[升级文档]() 26 | 27 | -------------------------------------------------------------------------------- /docs/zh-cn/other/donation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 捐赠支持 3 | --- 4 | 5 | ## 捐赠支持 6 | 支付宝 7 | 微信 8 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerThree 3 | --- 4 | 5 | # AmapLayerThree 6 | ThreeJS图层,基于AMap.GLCustomLayer,增加通用的配置,目前包含lights(灯光)、hdr。 7 | 可以通过获取scene来自定义添加模型。 8 | 9 | 10 | ## Attributes 11 | 12 | Attribute | Type | Description 13 | ---|---|---| 14 | lights | Array | 配置灯光数据,具体参数见下面 15 | hdr | Object | HDR功能配置,具体参数见下面 16 | alpha | Boolean | canvas是否包含alpha (透明度)。默认为 true 17 | antialias | Boolean | 是否执行抗锯齿。默认为false 18 | zooms | Array | 支持的缩放级别范围,默认范围 [2-20] 19 | visible | Boolean | 是否显示,默认 true 20 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 21 | opacity | Number | 透明度,默认 1 22 | axesHelper | Boolean | 是否开启debug的箭头,默认false 23 | createCanvas | Boolean | 是否创建新的canvas绘制threejs,默认false 24 | webGLRendererParameters | WebGLRendererParameters | 创建WebglRenderer时传递的数据 25 | createCssRender | Boolean | 是否创建cssRender,只有开启cssRender后,gltf组件的popup才能生效 26 | 27 | 28 | ## Events 29 | 30 | Event Name | Parameters | Description 31 | ---|------------------|---| 32 | init | AMap.CustomLayer | 实例初始化结束 33 | click | Object3D | 点击图层,获取自定义的物体 34 | mouseover | Object3D | 移动到自定义的物体上 35 | mouseout | Object3D | 从自定义的物体上移除 36 | 37 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-light-ambient.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeLightAmbient 3 | --- 4 | 5 | # AmapThreeLightAmbient 6 | ThreeJS的环境光会均匀的照亮场景中的所有物体 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|-------------------------------------|---| 12 | color | String | 颜色 13 | intensity | Number | 光照的强度。缺省值为 1 14 | 15 | ## Events 16 | 17 | Event Name | Parameters | Description 18 | ---|------------|---| 19 | init | Light | 实例初始化结束 20 | 21 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-light-directional.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeLightDirectional 3 | --- 4 | 5 | # AmapThreeLightDirectional 6 | 平行光是沿着特定方向发射的光。这种光的表现像是无限远,从它发出的光线都是平行的。常常用平行光来模拟太阳光 的效果; 太阳足够远,因此我们可以认为太阳的位置是无限远,所以我们认为从太阳发出的光线也都是平行的 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|-------------------------------------|---| 12 | color | String | 颜色 13 | intensity | Number | 光照的强度。缺省值为 1 14 | position | {x:number,y:number,z:number} | 灯光位置 15 | target | Object3D | 物体,配置后,平行光将跟着物体 16 | 17 | ## Events 18 | 19 | Event Name | Parameters | Description 20 | ---|------------|---| 21 | init | ThreeLightAmbient | 实例初始化结束 22 | 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-light-hemisphere.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeLightHemisphere 3 | --- 4 | 5 | # AmapThreeLightHemisphere 6 | 光源直接放置于场景之上,光照颜色从天空光线颜色渐变到地面光线颜色。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|-------------------------------------|---| 12 | color | String | 天空中发出光线的颜色 13 | groundColor | String | 地面发出光线的颜色 14 | intensity | Number | 光照的强度。缺省值为 1 15 | position | {x:number,y:number,z:number} | 灯光位置 16 | 17 | ## Events 18 | 19 | Event Name | Parameters | Description 20 | ---|------------|---| 21 | init | ThreeLightHemisphere | 实例初始化结束 22 | 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-light-point.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeLightPoint 3 | --- 4 | 5 | # AmapThreeLightPoint 6 | 从一个点向各个方向发射的光源。一个常见的例子是模拟一个灯泡发出的光。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|-------------------------------------|---| 12 | color | String | 颜色 13 | intensity | Number | 光照的强度。缺省值为 1 14 | distance | Number | 这个距离表示从光源到光照强度为0的位置。 当设置为0时,光永远不会消失(距离无穷大)。缺省值 0 15 | decay | Number | 沿着光照距离的衰退量。缺省值 1 16 | position | {x:number,y:number,z:number} | 灯光位置 17 | 18 | ## Events 19 | 20 | Event Name | Parameters | Description 21 | ---|------------|---| 22 | init | ThreeLightPoint | 实例初始化结束 23 | 24 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-light-spot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeLightSpot 3 | --- 4 | 5 | # AmapThreeLightSpot 6 | 光线从一个点沿一个方向射出,随着光线照射的变远,光线圆锥体的尺寸也逐渐增大。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|------------------------------|---| 12 | color | String | 颜色 13 | intensity | Number | 光照的强度。缺省值为 1 14 | distance | Number | 这个距离表示从光源到光照强度为0的位置。 当设置为0时,光永远不会消失(距离无穷大)。缺省值 0 15 | angle | Number | 光线散射角度,最大为Math.PI/2 16 | penumbra | Number | 聚光锥的半影衰减百分比。在0和1之间的值。默认为0 17 | decay | Number | 沿着光照距离的衰退量。缺省值 1 18 | position | {x:number,y:number,z:number} | 灯光位置 19 | target | Object3D | 灯光目标 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|------------|---| 25 | init | ThreeLightSpot | 实例初始化结束 26 | 27 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-polygon.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreePolygon 3 | --- 4 | 5 | # AmapThreePolygon 6 | ThreeJS的面图层,支持侧面贴图,主要用于生成建筑 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|--------|---| 12 | sideTopColor | String | 侧面顶部颜色, 默认 #ffffff 13 | sideBottomColor | String | 侧面底部颜色, 默认 #ffffff 14 | sideTexture | String | 侧面贴图图片地址,侧面优先使用该属性,默认空 15 | topColor | String | 顶部颜色, 默认 #ffffff 16 | bottomColor | String | 底部颜色, 默认 #ffffff 17 | height | Number | 楼层高度,优先读取geojson数据中properties中的height,默认 30 18 | depthTest | Boolean | 是否进行深度检测, 默认 true 19 | source | Object | geojson数据 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|------------|---| 25 | init | ThreePolygon | 实例初始化结束 26 | 27 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-extra/three-video.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapThreeVideo 3 | --- 4 | 5 | # AmapThreeVideo 6 | ThreeJS的视频实现,支持任意旋转,支持三维展示。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|-------------------|---| 12 | video | String,Array,HTMLVideoElement | 视频地址 13 | visible | Boolean | 是否显示,默认 true 14 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:0 15 | opacity | Number | 透明度,默认 1 16 | videoTranslate | {x:number, y:number, z: number} | 视频位置偏移,主要用于配合背景使用 17 | videoWidth | Number | 视频宽度,不填写时默认使用实际宽度 18 | videoHeight | Number | 视频高度,不填写时默认使用实际高度 19 | canvas | HTMLCanvasElement | 背景Canvas 20 | position | Array | 位置经纬度 21 | altitude | Number | 视频海拔高度 22 | rotation | {x:number, y:number, z:number} | 旋转角度 23 | scale | Number, Array | 缩放大小 24 | angle | Number | 旋转角度 25 | alwaysFront | Boolean | 是否一直面朝屏幕,默认false 26 | 27 | 28 | ## Events 29 | 30 | Event Name | Parameters | Description 31 | ---|------------|---| 32 | init | ThreeVideo | 实例初始化结束 33 | 34 | 35 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/ambient-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaAmbientLight 3 | --- 4 | 5 | # AmapLocaAmbientLight 6 | 环境光,对于可以接受光照的图层(PolygonLayer 等)会增加环境光的影响。环境光只能有一个,多余的会被忽略 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | color | String | 环境光颜色 13 | intensity | Number | 环境光强度 14 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 15 | 16 | ## Events 17 | 18 | Event Name | Parameters | Description 19 | ---|---|---| 20 | init | Loca.AmbientLight | 实例 21 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/directional-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaDirectionalLight 3 | --- 4 | 5 | # AmapLocaDirectionalLight 6 | 平行光,对于可以接受光照的图层(PolygonLayer 等)会增加平行光的影响。平行光一般用来模拟太阳的光照。 它的方向由 position 射向 target。position和target的坐标是一个位置加 z 值(单位米)高度决定。比如: [1, 1, 1000] 代表x:1, y:1, 高度1000米。 如果模拟一个从正南方向的平行光,可以设置target: [0,0,0], position: [0,-1,0] 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---------------|---| 12 | color | String | 平行光颜色 13 | intensity | Number | 平行光强度 14 | position | Array | 坐标位置 15 | target | Array | 光射向的目标位置 16 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 17 | 18 | ## Events 19 | 20 | Event Name | Parameters | Description 21 | ---|---|---| 22 | init | Loca.DirectionalLight | 实例 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/icon-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaIcon 3 | --- 4 | 5 | # AmapLocaIcon 6 | 图标图层 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | initEvents | Boolean | 是否创建事件,自动为loca图层创建click和mousemove事件。 默认 true 13 | defaultStyleValue | Object | 默认样式,可以查看下面属性说明 14 | visible | Boolean | 点标记是否可见,默认为true。 15 | zIndex | Number | 点标记的叠加顺序。地图上存在多个点标记叠加时,通过该属性使级别较高的点标记在上层显示,默认zIndex:12 16 | sourceUrl | String | 数据源的链接地址,一般是接口地址,返回的数据必须是 geojson 格式。 17 | sourceData | Object | 数据对象。如果你不想使用 url 方式请求数据,可以直接填写请求好的 geojson 对象。 sourceUrl与sourceData只会生效一个,默认优先判断sourceUrl 18 | layerStyle | Object | 图层样式 19 | zooms | Array | 图层缩放等级范围,默认[2,20] 20 | opacity | Number | 图层整体透明度,默认 1 21 | visibleDuration | Number | 图层显隐时候过渡的时间,默认为0 22 | geoBufferSource | [ArrayBuffer, String] | protocol-buffers(PBF) 格式的数据源,能够大幅压缩数据体积,有效减少数据传输时间。目前仅支持基于 mapbox/geobuf 的 GeoJSON PBF 实现 23 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 24 | 25 | ## Events 26 | 27 | Event Name | Parameters | Description 28 | ---|---|---| 29 | init | Loca.IconLayer | 实例 30 | click | Feature, event | 当点击到标号时返回对应的feature,否则返回undefined 31 | mousemove | Feature, event | 当鼠标移动滑过标号时返回对应的feature,否则返回undefined 32 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/line-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaLine 3 | --- 4 | 5 | # AmapLocaLine 6 | 线图层,支持设置描边和虚线。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | initEvents | Boolean | 是否创建事件,自动为loca图层创建click和mousemove事件。 默认 true 13 | defaultStyleValue | Object | 默认样式,可以查看下面属性说明 14 | visible | Boolean | 点标记是否可见,默认为true。 15 | zIndex | Number | 点标记的叠加顺序。地图上存在多个点标记叠加时,通过该属性使级别较高的点标记在上层显示,默认zIndex:12 16 | sourceUrl | String | 数据源的链接地址,一般是接口地址,返回的数据必须是 geojson 格式。 17 | sourceData | Object | 数据对象。如果你不想使用 url 方式请求数据,可以直接填写请求好的 geojson 对象。 sourceUrl与sourceData只会生效一个,默认优先判断sourceUrl 18 | layerStyle | Object | 图层样式 19 | zooms | Array | 图层缩放等级范围,默认[2,20] 20 | opacity | Number | 图层整体透明度,默认 1 21 | visibleDuration | Number | 图层显隐时候过渡的时间,默认为0 22 | geoBufferSource | [ArrayBuffer, String] | protocol-buffers(PBF) 格式的数据源,能够大幅压缩数据体积,有效减少数据传输时间。目前仅支持基于 mapbox/geobuf 的 GeoJSON PBF 实现 23 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 24 | 25 | ## Events 26 | 27 | Event Name | Parameters | Description 28 | ---|---|---| 29 | init | Loca.LineLayer | 实例 30 | click | Feature, event | 当点击到标号时返回对应的feature,否则返回undefined 31 | mousemove | Feature, event | 当鼠标移动滑过标号时返回对应的feature,否则返回undefined 32 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/link-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaLink 3 | --- 4 | 5 | # AmapLocaLink 6 | 链接线图层 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | initEvents | Boolean | 是否创建事件,自动为loca图层创建click和mousemove事件。 默认 true 13 | defaultStyleValue | Object | 默认样式,可以查看下面属性说明 14 | visible | Boolean | 点标记是否可见,默认为true。 15 | zIndex | Number | 点标记的叠加顺序。地图上存在多个点标记叠加时,通过该属性使级别较高的点标记在上层显示,默认zIndex:12 16 | sourceUrl | String | 数据源的链接地址,一般是接口地址,返回的数据必须是 geojson 格式。 17 | sourceData | Object | 数据对象。如果你不想使用 url 方式请求数据,可以直接填写请求好的 geojson 对象。 sourceUrl与sourceData只会生效一个,默认优先判断sourceUrl 18 | layerStyle | Object | 图层样式 19 | zooms | Array | 图层缩放等级范围,默认[2,20] 20 | opacity | Number | 图层整体透明度,默认 1 21 | visibleDuration | Number | 图层显隐时候过渡的时间,默认为0 22 | geoBufferSource | [ArrayBuffer, String] | protocol-buffers(PBF) 格式的数据源,能够大幅压缩数据体积,有效减少数据传输时间。目前仅支持基于 mapbox/geobuf 的 GeoJSON PBF 实现 23 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 24 | 25 | ## Events 26 | 27 | Event Name | Parameters | Description 28 | ---|---|---| 29 | init | Loca.LinkLayer | 实例 30 | click | Feature, event | 当点击到标号时返回对应的feature,否则返回undefined 31 | mousemove | Feature, event | 当鼠标移动滑过标号时返回对应的feature,否则返回undefined 32 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/loca.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLoca 3 | --- 4 | 5 | # AmapLoca 6 | 图层的容器和控制器 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---------|---| 12 | eventOptions | Object `{hitFirst: true}` | 事件属性,hitFirst是设置是否在选择到第一个要素后停止选择,用于事件数据选取,默认true 13 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 14 | 15 | ## Events 16 | 17 | Event Name | Parameters | Description 18 | ---|---|---| 19 | init | Loca.Container | 实例 20 | click | \[Feature\], event | 当点击到标号时返回对应的feature数组,无数据时返回空数组 21 | mousemove | \[Feature\], event | 当鼠标移动滑过标号时返回对应的feature数组,无数据时返回空数组 22 | rightclick | \[Feature\], event | 鼠标右击时返回对应的feature数组,无数据时返回空数组 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap-loca/point-light.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLocaPointLight 3 | --- 4 | 5 | # AmapLocaPointLight 6 | 点光,对于可以接受光照的图层(PolygonLayer 等)会增加点光的影响。点光源通常用来突出展示场景中的某些物体。 它的位置和平行光不太一样,x和y是地图上的经纬度位置,z是高度米,比如北京上空一万米的位置放一个点光源:position: [116.39079, 39.90624, 10000]。 光照的distance代表光能照射的最远距离是多少 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | color | String | 点光颜色 13 | intensity | Number | 光照强度 14 | position | Array | 点光位置 15 | distance | Number | 距离表示从光源到光照强度为 0 的位置,0 就是光不会消失 16 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 17 | 18 | ## Events 19 | 20 | Event Name | Parameters | Description 21 | ---|---|---| 22 | init | Loca.PointLight | 实例 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/control/control-bar.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapControlControlBar 3 | --- 4 | 5 | # AmapControlControlBar 6 | 组合了旋转、倾斜、复位在内的地图控件 7 | 8 | 9 | ## Attributes 10 | 11 | Attribute | Type | Description 12 | ---|---|---| 13 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 14 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 15 | showControlButton | Boolean | 是否显示倾斜、旋转按钮。默认为 true 16 | visible | Boolean | 是否显示,默认true 17 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|---|---| 25 | show | | 显示时触发此事件 26 | hide | | 隐藏时触发此事件 27 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/control/map-type.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapControlMapType 3 | --- 4 | 5 | # AmapControlMapType 6 | 地图类型切换插件。用户通过该插件进行地图切换。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | defaultType | Number | 初始化默认图层类型。 取值为0:默认底图 取值为1:卫星图 默认值:0 13 | showTraffic | Boolean | 叠加实时交通图层 默认值:false 14 | showRoad | Boolean | 叠加路网图层 默认值:false 15 | visible | Boolean | 是否显示,默认true 16 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 17 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 18 | 19 | ## Events 20 | 21 | | Event Name | Parameters | Description | 22 | ---|---|---| 23 | show | | 显示时触发此事件 24 | hide | | 隐藏时触发此事件 25 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/control/scale.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapControlScale 3 | --- 4 | 5 | # AmapControlScale 6 | 位于地图右下角,用户可控制其显示与隐藏。继承自 AMap.Control 7 | 8 | 9 | ## Attributes 10 | 11 | Attribute | Type | Description 12 | ---|---|---| 13 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 14 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 15 | animateEnable | Array | 相对于地图容器左上角的偏移量,正数代表向右下偏移。默认为AMap.Pixel(10,10) 16 | visible | Boolean | 是否显示,默认true 17 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | ## Events 21 | 22 | Event Name | Parameters | Description 23 | ---|---|---| 24 | show | | 显示时触发此事件 25 | hide | | 隐藏时触发此事件 26 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/control/tool-bar.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapControlToolBar 3 | --- 4 | 5 | # AmapControlToolBar 6 | 地图操作工具条插件。可支持方向导航、位置定位、视野级别缩放、视野级别选择等操作。继承自 AMap.Control 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | position| String, Object | 控件停靠位置 { top: 5; left: 5; right: 5; bottom: 5 } 或者 'LT': 左上角, 'RT': 右上角, 'LB': 左下角, 'RB': 右下角 13 | offset | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。 14 | visible | Boolean | 是否显示,默认true 15 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 16 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 17 | 18 | ## Events 19 | 20 | Event Name | Parameters | Description 21 | ---|---|---| 22 | show | | 显示时触发此事件 23 | hide | | 隐藏时触发此事件 24 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/canvas.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerCanvas 3 | --- 4 | 5 | # AmapLayerCanvas 6 | Canvas图层类,用户可以将一个 Canvas 作为图层添加在地图上,Canvas图层会随缩放级别而自适应缩放。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | canvas | HTMLCanvasElement | Canvas DOM 对象 13 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 14 | bounds | Array, AMap.Bounds | 图片的范围大小经纬度,如果传递数字数组类型: [minlng,minlat,maxlng,maxlat] 15 | visible | Boolean | 是否显示,默认 true 16 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:6 17 | opacity | Number | 透明度,默认 1 18 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 19 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|---|---| 25 | init | AMap.CanvasLayer | 实例初始化结束 26 | complete | | 加载完成事件 27 | 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerCustom 3 | --- 4 | 5 | # AmapLayerCustom 6 | 自定义图层是一种完全由开发者来指定绘制方法的图层 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | canvas | HTMLElement | canvas 对象,必填 13 | render | Function | 绘制函数,初始化完成时候,开发者需要给该图层设定render方法,该方法需要实现图层的绘制,API会在合适的时机自动调用该方法 14 | alwaysRender | Boolean | 是否主动,默认 false 15 | zooms | Array | 支持的缩放级别范围,默认范围 [2-20] 16 | visible | Boolean | 是否显示,默认 true 17 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 18 | opacity | Number | 透明度,默认 1 19 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 20 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 21 | 22 | ## Events 23 | 24 | Event Name | Parameters | Description 25 | ---|---|---| 26 | init | AMap.CustomLayer | 实例初始化结束 27 | 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/flexible.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerFlexible 3 | --- 4 | 5 | # AmapLayerFlexible 6 | 灵活切片图层,继承自AMap.TileLayer,开发者可通过构造时传入给其传入createTile字段来指定每一个切片的内容
7 | [相关示例](https://lbs.amap.com/api/jsapi-v2/example/selflayer/flex-canvas/) 8 | 9 | ## Attributes 10 | 11 | Attribute | Type | Description 12 | ---|---|---| 13 | cacheSize | Number | 缓存瓦片数量 14 | createTile | Function | 由开发者实现,由API自动调用,xyz分别为切片横向纵向编号和层级,切片大小 256。假设每次创建的贴片为A(支持img或者canvas),当创建或者获取成功时请回调success(A),不需要显示或者失败时请回调fail() 15 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 16 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 17 | visible | Boolean | 是否显示,默认 true 18 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 19 | opacity | Number | 透明度,默认 1 20 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 21 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 22 | 23 | ## Events 24 | 25 | Event Name | Parameters | Description 26 | ---|---|---| 27 | init | AMap.TileLayer.Flexible | 实例初始化结束 28 | complete | | 图块切片加载完成事件 29 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/gl-custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerGlCustom 3 | --- 4 | 5 | # AmapLayerGlCustom 6 | 3d 自定义图层 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | init | Function | 初始化的时候,开发者可以在这个函数参数里面获取 gl 上下文,进行一些初始化的操作。 13 | render | Function | 绘制函数,初始化完成时候,开发者需要给该图层设定render方法,该方法需要实现图层的绘制,API会在合适的时机自动调用该方法 14 | zooms | Array | 支持的缩放级别范围,默认范围 [2-20] 15 | visible | Boolean | 是否显示,默认 true 16 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 17 | opacity | Number | 透明度,默认 1 18 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 19 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|---|---| 25 | init | AMap.GLCustomLayer | 实例初始化结束 26 | 27 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/heat-map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerHeatMap 3 | --- 4 | 5 | # AmapLayerHeatMap 6 | 热力图,基于第三方heatmap.js实现,以特殊高亮的形式显示数据密集程度。根据密集程度的不同,图上会呈现不同的颜色,以直观的形式展现数据密度。API引用了heatmap.js最新版本v2.0,v2.0基于新的渲染模型,具有更高的渲染效率和更强的性能。支持chrome、firefox、safari、ie9及以上浏览器。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | radius | Number | 热力图中单个点的半径,默认:30,单位:pixel 13 | gradient | Object | 热力图的渐变区间,热力图按照设置的颜色及间隔显示热力图,例{0.4:'rgb(0, 255, 255)',0.85:'rgb(100, 0, 255)',},其中 key 表示间隔位置,取值范围: [0,1] ,value 为颜色值。默认:heatmap.js标准配色方案 14 | config | Object | 3d参数在组件中被重命名为config,参数内容与3d一致。3D热力图属性 15 | zooms | Array | 支持的缩放级别范围,默认范围 [3-20] 16 | visible | Boolean | 是否显示,默认 true 17 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:130 18 | opacity | Number | 透明度,默认 1 19 | dataSet | Object | 热力图数据集 {data: points, max: 100} 20 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 21 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 22 | 23 | ## Events 24 | 25 | Event Name | Parameters | Description 26 | ---|---|---| 27 | init | AMap.HeatMap | 实例初始化结束 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/image.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerImage 3 | --- 4 | 5 | # AmapLayerImage 6 | 图片图层类,用户可以将一张静态图片作为图层添加在地图上,图片图层会随缩放级别而自适应缩放。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | url | String | 图片地址链接 13 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 14 | bounds | Array, AMap.Bounds | 图片的范围大小经纬度,如果传递数字数组类型: [minlng,minlat,maxlng,maxlat] 15 | visible | Boolean | 是否显示,默认 true 16 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:6 17 | opacity | Number | 透明度,默认 1 18 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 19 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|---|---| 25 | init | AMap.ImageLayer | 实例初始化结束 26 | complete | | 加载完成事件 27 | 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/labels.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerLabels 3 | --- 4 | 5 | # AmapLayerLabels 6 | 标注层。
7 | 有三种方法添加标注。使用效果见下面示例
8 | 1、通过init事件拿到layer实例,再调用`add`方法进行添加
9 | 2、通过$refs拿到layer的vue实例,再通过`$$add`方法进行添加
10 | 3、通过`slot`方式进行添加 11 | 12 | ## Attributes 13 | 14 | Attribute | Type | Description 15 | ---|---|---| 16 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 17 | visible | Boolean | 是否显示,默认 true 18 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 19 | opacity | Number | 透明度,默认 1 20 | collision | Boolean | 标注层内的标注是否避让 21 | allowCollision | Boolean | 标注层内的标注是否允许其它标注层对它避让 22 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 23 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 24 | 25 | ## Events 26 | 27 | Event Name | Parameters | Description 28 | ---|---|---| 29 | init | AMap.LabelsLayer | 实例初始化结束 30 | 31 | 32 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/tiles3d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerTiles3d 3 | --- 4 | 5 | # AmapLayerTiles3d 6 | 使用 AMap.3DTilesLayer 图层加载渲染标准 3D Tiles 数据,可支持 i3dm、b3dm、pnts 格式 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | url | String | 3d Tiles 入口文件 13 | threeScriptUrl | String | ThreeJS的文件加载地址 14 | threeGltfLoader | String | threeJS的GltfLoader文件加载地址 15 | layerStyle | Object | 图层样式 16 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 17 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 18 | 19 | ## Events 20 | 21 | Event Name | Parameters | Description 22 | ---|---|---| 23 | init | AMap.3DTilesLayer | 实例初始化结束 24 | 25 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/vector.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerVector 3 | --- 4 | 5 | # AmapLayerVector 6 | 矢量标记图层。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | visible | Boolean | 是否显示,默认 true 13 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:120 14 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 15 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 16 | 17 | ## Events 18 | 19 | Event Name | Parameters | Description 20 | ---|---|---| 21 | init | AMap.VectorLayer | 实例初始化结束 22 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/data/video.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerVideo 3 | --- 4 | 5 | # AmapLayerVideo 6 | Video图层类,用户可以将一个 Video 作为图层添加在地图上,Video图层会随缩放级别而自适应缩放,Video图层基于Canvas实现。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|--------------------|---| 12 | url | String | 视频地址 13 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 14 | bounds | Array, AMap.Bounds | 图片的范围大小经纬度,如果传递数字数组类型: [minlng,minlat,maxlng,maxlat] 15 | visible | Boolean | 是否显示,默认 true 16 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:6 17 | opacity | Number | 透明度,默认 1 18 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 19 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|------------|---| 25 | init | VideoLayer | 实例初始化结束 26 | 27 | 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/buildings.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerBuildings 3 | --- 4 | 5 | # AmapLayerBuildings 6 | 建筑楼块 3D 图层。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | wallColor | Array,String | 楼块侧面颜色,支持 rgba、rgb、十六进制等 13 | roofColor | Array,String | 楼块顶面颜色,支持 rgba、rgb、十六进制等 14 | heightFactor | Number | 楼块的高度系数因子,默认为 1,也就是正常高度 15 | styleOpts | Object | 楼块的围栏和样式设置 16 | zooms | Array | 图层缩放等级范围,默认 [2, 20] 17 | visible | Boolean | 是否显示,默认 true 18 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 19 | opacity | Number | 透明度,默认 1 20 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 21 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 22 | 23 | ## Events 24 | 25 | Event Name | Parameters | Description 26 | ---|---|---| 27 | init | AMap.Buildings | 实例初始化结束 28 | complete | | 图块切片加载完成事件 29 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/default-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerDefault 3 | --- 4 | 5 | # AmapLayerDefault 6 | 7 | ## Attributes 8 | 9 | Attribute | Type | Description 10 | ---|---|---| 11 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 12 | visible | Boolean | 是否可见,默认为true。 13 | zIndex | Number | 默认zIndex:0 14 | opacity | Number | 透明度 15 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 16 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 17 | 18 | ## Events 19 | 20 | Event Name | Parameters | Description 21 | ---|---|---| 22 | init | | 实例初始化结束 23 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/indoor-map.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerIndoorMap 3 | --- 4 | 5 | # AmapLayerIndoorMap 6 | 室内图层,用于在适当级别展示室内地图,并提供显示商铺tip、切换楼层等功能。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | cursor | String | 指定鼠标悬停到店铺面时的鼠标样式 13 | visible | Boolean | 是否显示,默认 true 14 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 15 | opacity | Number | 透明度,默认 1 16 | hideFloorBar | Boolean | 是否隐藏楼层切换控件,默认值:false 17 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | ## Events 21 | 22 | Event Name | Parameters | Description 23 | ---|---|---| 24 | init | AMap.IndoorMap | 实例初始化结束 25 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/roadNet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerRoadNet 3 | --- 4 | 5 | # AmapLayerRoadNet 6 | 路网图层,展示道路信息。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 13 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 14 | visible | Boolean | 是否显示,默认 true 15 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 16 | opacity | Number | 透明度,默认 1 17 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | ## Events 21 | 22 | Event Name | Parameters | Description 23 | ---|---|---| 24 | init | AMap.TileLayer.RoadNet | 实例初始化结束 25 | complete | | 图块切片加载完成事件 26 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/satellite.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerSatellite 3 | --- 4 | 5 | # AmapLayerSatellite 6 | 卫星图层类,继承自TileLayer。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 13 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 14 | visible | Boolean | 是否显示,默认 true 15 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 16 | opacity | Number | 透明度,默认 1 17 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | ## Events 21 | 22 | Event Name | Parameters | Description 23 | ---|---|---| 24 | init | AMap.TileLayer.Satellite | 实例初始化结束 25 | complete | | 图块切片加载完成事件 26 | 27 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/tile-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerTile 3 | --- 4 | 5 | # AmapLayerTile 6 | 切片图层类,该类为基础类。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | dataZooms | Array | 支持的缩放级别范围,默认范围 [2-30] 13 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 14 | tileUrl | String | 切片取图地址 如:' https://abc{0,1,2,3}.amap.com/tile?x=[x]&y=[y]&z=[z] ' [x] 、 [y] 、 [z] 分别替代切片的xyz。 15 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 16 | visible | Boolean | 是否显示,默认 true 17 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 18 | opacity | Number | 透明度,默认 1 19 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 20 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 21 | 22 | ## Events 23 | 24 | Event Name | Parameters | Description 25 | ---|---|---| 26 | init | AMap.TileLayer | 实例初始化结束 27 | complete | | 图块切片加载完成事件 28 | 29 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/official/traffic.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerTraffic 3 | --- 4 | 5 | # AmapLayerTraffic 6 | 实时交通图层类,继承自TileLayer。 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | autoRefresh | Boolean | 是否自动更新数据,默认开启 13 | tileSize | Number | 切片大小,取值: 256,表示切片大小为256 256, 128,表示切片大小为128 128, 64,表示切片大小为64*64。默认值为256 14 | interval | Number | 自动更新数据的间隔毫秒数,默认 180ms 15 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 16 | visible | Boolean | 是否显示,默认 true 17 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 18 | opacity | Number | 透明度,默认 1 19 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 20 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 21 | 22 | ## Events 23 | 24 | Event Name | Parameters | Description 25 | ---|---|---| 26 | init | AMap.TileLayer.Traffic | 实例初始化结束 27 | complete | | 图块切片加载完成事件 28 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/standard/mapbox-vector-tile-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerMapboxVectorTile 3 | --- 4 | 5 | # AmapLayerMapboxVectorTile 6 | 为了满足基于矢量瓦片块的数据可视化、矢量瓦片边界展示等开发需求,通过 AMap.MapboxVectorTileLayer 插件提供了简易矢量瓦片图层 7 | 此图层可以使用标准的 MVT 瓦片服务作为数据源。 8 | 可以配合[GeoHub-数据中心](https://geohub.amap.com/)发布的矢量瓦片服务。 注意:使用高德数据平台发布服务,由于服务 URL 地址是明文,建议自行做服务代理转发,防止服务 ID 和 Key 明文传输导致数据泄露。 9 | [相关示例](https://lbs.amap.com/demo/jsapi-v2/example/thirdlayer/mvt-layer) 10 | 11 | ## Attributes 12 | 13 | Attribute | Type | Description 14 | ---|---|---| 15 | url | String | MVT 数据的链接地址 16 | dataZooms | Array | 瓦片数据等级范围,超过范围会使用最大/最小等级的数据,默认范围 [2,18] 17 | zooms | Array | 支持的缩放级别范围,默认范围 [2,22] 18 | visible | Boolean | 是否显示,默认 true 19 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 20 | opacity | Number | 透明度,默认 1 21 | styles | Object | 样式 22 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 23 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 24 | 25 | ## Events 26 | 27 | Event Name | Parameters | Description 28 | ---|---|---| 29 | init | TileLayer.WMS | 实例初始化结束 30 | 31 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/standard/wms.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerWms 3 | --- 4 | 5 | # AmapLayerWms 6 | 用于加载OGC标准的WMS地图服务的一种图层类,仅支持EPSG3857坐标系统的WMS图层。 7 | [查看 WMS的OGC标准](http://www.opengeospatial.org/standards/wms) 8 | 9 | ## Attributes 10 | 11 | Attribute | Type | Description 12 | ---|---|---| 13 | blend | Boolean | 地图级别切换时,不同级别的图片是否进行混合,如图层的图像内容为部分透明请设置为false 14 | url | String | wmts服务的url地址,如:' https://services.arcgisonline.com/arcgis/rest/services/'+ 'Demographics/USA_Population_Density/MapServer/WMTS/' 15 | params | Object | OGC标准的WMS地图服务的GetMap接口的参数,包括VERSION、LAYERS、STYLES、FORMAT、TRANSPARENT等,
CRS、BBOX、REQUEST、WIDTH、HEIGHT等参数请勿添加,例如:
{
LAYERS: 'topp:states',
VERSION:'1.3.0',
FORMAT:'image/png'
} 16 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 17 | visible | Boolean | 是否显示,默认 true 18 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 19 | opacity | Number | 透明度,默认 1 20 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 21 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 22 | 23 | ## Events 24 | 25 | Event Name | Parameters | Description 26 | ---|---|---| 27 | init | TileLayer.WMS | 实例初始化结束 28 | complete | | 图块切片加载完成事件 29 | 30 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/layer/standard/wmts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapLayerWmts 3 | --- 4 | 5 | # AmapLayerWmts 6 | 用于加载OGC标准的WMS地图服务的一种图层类,仅支持EPSG3857坐标系统的WMTS图层。 7 | [查看 WMTS 标准](http://www.opengeospatial.org/standards/wmts) 8 | 9 | ## Attributes 10 | 11 | Attribute | Type | Description 12 | ---|---|---| 13 | blend | Boolean | 地图级别切换时,不同级别的图片是否进行混合,如图层的图像内容为部分透明请设置为false 14 | url | String | wmts服务的url地址,如:' https://services.arcgisonline.com/arcgis/rest/services/'+ 'Demographics/USA_Population_Density/MapServer/WMTS/' 15 | params | Object | OGC标准的WMS地图服务的GetMap接口的参数,包括VERSION、LAYERS、STYLES、FORMAT、TRANSPARENT等,
CRS、BBOX、REQUEST、WIDTH、HEIGHT等参数请勿添加,例如:
{
LAYERS: 'topp:states',
VERSION:'1.3.0',
FORMAT:'image/png'
} 16 | zooms | Array | 支持的缩放级别范围,默认范围 [2-30] 17 | visible | Boolean | 是否显示,默认 true 18 | zIndex | Number | 图层叠加的顺序值,1 表示最底层。默认 zIndex:4 19 | opacity | Number | 透明度,默认 1 20 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 21 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 22 | 23 | ## Events 24 | 25 | Event Name | Parameters | Description 26 | ---|---|---| 27 | init | TileLayer.WMTS | 实例初始化结束 28 | 29 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/marker/mass-marks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapMassMarks 3 | --- 4 | 5 | # AmapMassMarks 6 | 海量点类 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---|---| 12 | data | Array | 海量点数据 13 | visible | Boolean | 点标记是否可见,默认为true。 14 | zIndex | Number | 点标记的叠加顺序。地图上存在多个点标记叠加时,通过该属性使级别较高的点标记在上层显示,默认zIndex:12 15 | zooms | Array | 点标记显示的层级范围,超过范围不显示。默认值:zooms: [2, 20] 16 | cursor | String | 指定鼠标悬停时的鼠,默认值:'pointer' 17 | styles | Array, Object | 标号样式,可以是Object代表所有点样式一样,也可以是Array,根据各个点的设定来判断选择哪个样式 18 | reEventWhenUpdate | Boolean | 是否在组件更新时重新注册事件,主要用于数组更新时,解决绑定了事件但事件的对象不会更新问题,默认false 19 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 20 | 21 | ## Events 22 | 23 | Event Name | Parameters | Description 24 | ---|---|---| 25 | init | AMap.MassMarks | `AMap.MassMarks`实例 26 | complete | | 海量点加载完成事件 27 | click | MapsEvent | 鼠标左键单击事件 28 | dblclick | MapsEvent | 鼠标左键双击事件 29 | mousemove | MapsEvent | 鼠标移动 30 | mouseover | MapsEvent | 鼠标移近点标记时触发事件 31 | mouseout | MapsEvent | 鼠标移出点标记时触发事件 32 | mousedown | MapsEvent | 鼠标在点标记上按下时触发事件 33 | mouseup | MapsEvent | 鼠标在点标记上按下后抬起时触发事件 34 | touchstart | MapsEvent | 触摸开始时触发事件,仅适用移动设备 35 | touchend | MapsEvent | 触摸结束时触发事件,仅适用移动设备 36 | -------------------------------------------------------------------------------- /ide-api/component/vue-amap/util/mouse-tool.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AmapMouseTool 3 | --- 4 | 5 | # AmapMouseTool 6 | 鼠标工具插件。通过该插件,可进行鼠标画标记点、线、多边形、矩形、圆、距离量测、面积量测、拉框放大、拉框缩小等功能 7 | 8 | ## Attributes 9 | 10 | Attribute | Type | Description 11 | ---|---------|---| 12 | type | String | 类型,默认 marker,可选值'marker', 'circle', 'rectangle', 'polyline', 'polygon', 'measureArea', 'rule', 'rectZoomIn', 'rectZoomOut' 13 | drawOptions | Object | 设置绘制的图形的属性,可以实时更改,在切换时会生效,默认 null 14 | autoClear | Boolean | 是否自动清除地图上的绘制的图形,默认true 15 | showTooltip | Boolean | 是否显示提示信息,默认 true 16 | tooltipTextMap | Object | 是否可见 17 | textOptions | Object | 提示信息的text的属性 18 | extraOptions | Object | 额外扩展属性,会直接将属性拷贝到初始化的options中,当key与props内的一样时会被props覆盖 19 | 20 | ## Events 21 | 22 | Event Name | Parameters | Description 23 | ---|-------------|---| 24 | init | Object | 组件实例 25 | draw | data,target | 绘制事件 26 | -------------------------------------------------------------------------------- /image/weixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/image/weixin.png -------------------------------------------------------------------------------- /image/zhifubao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/image/zhifubao.jpg -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | # 2 | packages: 3 | - 'src/**' 4 | - '!src/*/dist' 5 | - docs 6 | - test 7 | - '!packages/__mocks__' 8 | - '!**/__tests__/**' 9 | -------------------------------------------------------------------------------- /scripts/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | 'no-console': 'off', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /scripts/publish-amap-beta.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:amap 5 | 6 | cd ../src/vue-amap/dist 7 | npm publish --tag=beta --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-amap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:amap 5 | 6 | cd ../src/vue-amap/dist 7 | npm publish --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-extra-beta.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:extra 5 | 6 | cd ../src/vue-amap-extra/dist 7 | npm publish --tag=beta --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-extra.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:extra 5 | 6 | cd ../src/vue-amap-extra/dist 7 | npm publish --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-loca-beta.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:loca 5 | 6 | cd ../src/vue-amap-loca/dist 7 | npm publish --tag=beta --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-loca.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:loca 5 | 6 | cd ../src/vue-amap-loca/dist 7 | npm publish --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-util-beta.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:util 5 | 6 | cd ../src/vue-amap-util 7 | npm publish --tag=beta --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /scripts/publish-util.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | pnpm run build:util 5 | 6 | cd ../src/vue-amap-util 7 | npm publish --access public 8 | cd - 9 | 10 | echo "Publish completed" 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 gyy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/vue-amap-extra/README.md: -------------------------------------------------------------------------------- 1 | 2 | # @vuemap/vue-amap-extra 3 | [![npm (tag)](https://img.shields.io/npm/v/@vuemap/vue-amap-extra)](https://www.npmjs.org/package/@vuemap/vue-amap-extra) 4 | [![NPM downloads](http://img.shields.io/npm/dm/@vuemap/vue-amap-extra.svg)](https://npmjs.org/package/@vuemap/vue-amap-extra) 5 | ![JS gzip size](http://img.badgesize.io/https://unpkg.com/@vuemap/vue-amap-extra/dist/index.min.js?compression=gzip&label=gzip%20size:%20JS) 6 | [![NPM](https://img.shields.io/npm/l/@vuemap/vue-amap-extra)](https://gitee.com/guyangyang/vue-amap) 7 | [![star](https://gitee.com/guyangyang/vue-amap/badge/star.svg?theme=dark)](https://gitee.com/guyangyang/vue-amap/stargazers) 8 | 9 | ## 文档 10 | **[https://vue-amap.guyixi.cn](https://vue-amap.guyixi.cn)** 11 | 12 | > @vuemap/vue-amap-extra依赖@vuemap/vue-amap。 13 | -------------------------------------------------------------------------------- /src/vue-amap-extra/component.ts: -------------------------------------------------------------------------------- 1 | import {ElAmapLayerThree} from './packages/ThreeLayer'; 2 | import {ElAmapThreeGltf} from './packages/ThreeGltf'; 3 | import {ElAmapThreeVideo} from "./packages/ThreeVideo"; 4 | import {ElAmapThreeLightAmbient} from './packages/ThreeLightAmbient'; 5 | import {ElAmapThreeLightDirectional} from './packages/ThreeLightDirectional'; 6 | import {ElAmapThreeLightHemisphere} from './packages/ThreeLightHemisphere'; 7 | import {ElAmapThreeLightPoint} from './packages/ThreeLightPoint'; 8 | import {ElAmapThreeLightSpot} from './packages/ThreeLightSpot'; 9 | import {ElAmapThreePolygon} from './packages/ThreePolygon'; 10 | import {ElAmapThreeTiles3d} from './packages/Three3Dtiles'; 11 | 12 | import type { Plugin } from 'vue'; 13 | 14 | export default [ 15 | ElAmapLayerThree, 16 | ElAmapThreeGltf, 17 | ElAmapThreeVideo, 18 | ElAmapThreeLightAmbient, 19 | ElAmapThreeLightDirectional, 20 | ElAmapThreeLightHemisphere, 21 | ElAmapThreeLightPoint, 22 | ElAmapThreeLightSpot, 23 | ElAmapThreePolygon, 24 | ElAmapThreeTiles3d, 25 | ] as Plugin[]; 26 | -------------------------------------------------------------------------------- /src/vue-amap-extra/defaults.ts: -------------------------------------------------------------------------------- 1 | import { makeInstaller } from '@vuemap/vue-amap'; 2 | import Components from './component'; 3 | 4 | export default makeInstaller([...Components]); 5 | -------------------------------------------------------------------------------- /src/vue-amap-extra/global.d.ts: -------------------------------------------------------------------------------- 1 | // GlobalComponents for Volar 2 | 3 | declare module '@vue/runtime-core' { 4 | export interface GlobalComponents { 5 | ElAmapLayerThree: typeof import('@vuemap/vue-amap-extra')['ElAmapLayerThree'], 6 | ElAmapThreeGltf: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeGltf'], 7 | ElAmapThreeLightAmbient: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeLightAmbient'], 8 | ElAmapThreeLightDirectional: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeLightDirectional'], 9 | ElAmapThreeLightHemisphere: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeLightHemisphere'], 10 | ElAmapThreeLightPoint: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeLightPoint'], 11 | ElAmapThreeLightSpot: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeLightSpot'], 12 | ElAmapThreePolygon: typeof import('@vuemap/vue-amap-extra')['ElAmapThreePolygon'], 13 | ElAmapThreeVideo: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeVideo'], 14 | ElAmapThreeTiles3d: typeof import('@vuemap/vue-amap-extra')['ElAmapThreeTiles3d'], 15 | } 16 | } 17 | 18 | export {} 19 | -------------------------------------------------------------------------------- /src/vue-amap-extra/index.ts: -------------------------------------------------------------------------------- 1 | import installer from './defaults'; 2 | export * from './packages'; 3 | export { default } from './defaults'; 4 | export const install = installer.install; 5 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/Three3Dtiles/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | 7 | export type LngLat = [number, number] 8 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/Three3Dtiles/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeTiles3d from './ThreeTiles3d.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeTiles3d.install = (app: App) => { 4 | app.component(ThreeTiles3d.name, ThreeTiles3d); 5 | return app; 6 | }; 7 | export const ElAmapThreeTiles3d = ThreeTiles3d as typeof ThreeTiles3d & Plugin; 8 | export default ElAmapThreeTiles3d; 9 | 10 | export type ElAmapThreeTiles3dInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeGltf/Type.ts: -------------------------------------------------------------------------------- 1 | import type {GLTFLoader} from "three/examples/jsm/loaders/GLTFLoader"; 2 | 3 | export interface Vec { 4 | x: number 5 | y: number 6 | z: number 7 | } 8 | 9 | export interface MoveAnimation { 10 | duration?: number 11 | smooth: boolean 12 | } 13 | 14 | export type ConfigLoader = (loader: GLTFLoader) => void 15 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeGltf/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeGltf from './ThreeGltf.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeGltf.install = (app: App) => { 4 | app.component(ThreeGltf.name, ThreeGltf); 5 | return app; 6 | }; 7 | export const ElAmapThreeGltf = ThreeGltf as typeof ThreeGltf & Plugin; 8 | export default ElAmapThreeGltf; 9 | 10 | export type ElAmapThreeGltfInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLayer/ThreeRenderPass.js: -------------------------------------------------------------------------------- 1 | import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'; 2 | 3 | class ThreeRenderPass extends RenderPass { 4 | constructor( scene, camera, overrideMaterial, clearColor, clearAlpha ){ 5 | super(scene, camera, overrideMaterial, clearColor, clearAlpha) 6 | this.clear = false; 7 | } 8 | setCamera(camera) { 9 | this.camera = camera; 10 | } 11 | 12 | } 13 | 14 | export { ThreeRenderPass }; 15 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLayer/Type.ts: -------------------------------------------------------------------------------- 1 | export interface LightOption { 2 | type: string 3 | args: any[] 4 | position?: { 5 | x: number 6 | y: number 7 | z: number 8 | } 9 | lookAt?: { 10 | x: number 11 | y: number 12 | z: number 13 | } 14 | 15 | } 16 | 17 | export interface HDROptions { 18 | urls: string[] 19 | path: string 20 | exposure?: number // 光亮程度 21 | } 22 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLayer/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLayer from './ThreeLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLayer.install = (app: App) => { 4 | app.component(ThreeLayer.name, ThreeLayer); 5 | return app; 6 | }; 7 | export const ElAmapLayerThree = ThreeLayer as typeof ThreeLayer & Plugin; 8 | export default ElAmapLayerThree; 9 | 10 | export type ElAmapLayerThreeInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightAmbient/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLightAmbient from './ThreeLightAmbient.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLightAmbient.install = (app: App) => { 4 | app.component(ThreeLightAmbient.name, ThreeLightAmbient); 5 | return app; 6 | }; 7 | export const ElAmapThreeLightAmbient = ThreeLightAmbient as typeof ThreeLightAmbient & Plugin; 8 | export default ElAmapThreeLightAmbient; 9 | 10 | export type ElAmapThreeLightAmbientInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightDirectional/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightDirectional/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLightDirectional from './ThreeLightDirectional.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLightDirectional.install = (app: App) => { 4 | app.component(ThreeLightDirectional.name, ThreeLightDirectional); 5 | return app; 6 | }; 7 | export const ElAmapThreeLightDirectional = ThreeLightDirectional as typeof ThreeLightDirectional & Plugin; 8 | export default ElAmapThreeLightDirectional; 9 | 10 | export type ElAmapThreeLightDirectionalInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightHemisphere/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightHemisphere/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLightHemisphere from './ThreeLightHemisphere.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLightHemisphere.install = (app: App) => { 4 | app.component(ThreeLightHemisphere.name, ThreeLightHemisphere); 5 | return app; 6 | }; 7 | export const ElAmapThreeLightHemisphere = ThreeLightHemisphere as typeof ThreeLightHemisphere & Plugin; 8 | export default ElAmapThreeLightHemisphere; 9 | 10 | export type ElAmapThreeLightHemisphereInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightPoint/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightPoint/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLightPoint from './ThreeLightPoint.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLightPoint.install = (app: App) => { 4 | app.component(ThreeLightPoint.name, ThreeLightPoint); 5 | return app; 6 | }; 7 | export const ElAmapThreeLightPoint = ThreeLightPoint as typeof ThreeLightPoint & Plugin; 8 | export default ElAmapThreeLightPoint; 9 | 10 | export type ElAmapThreeLightPointInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightSpot/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeLightSpot/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeLightSpot from './ThreeLightSpot.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeLightSpot.install = (app: App) => { 4 | app.component(ThreeLightSpot.name, ThreeLightSpot); 5 | return app; 6 | }; 7 | export const ElAmapThreeLightSpot = ThreeLightSpot as typeof ThreeLightSpot & Plugin; 8 | export default ElAmapThreeLightSpot; 9 | 10 | export type ElAmapThreeLightSpotInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreePassCircle/Type.ts: -------------------------------------------------------------------------------- 1 | import type{Vector3, Color} from 'three' 2 | 3 | export interface CircleOptions { 4 | center?: Vector3 5 | innerRadius?: number 6 | outerRadius?: number 7 | fillType?: number 8 | fillColor?: Color 9 | } 10 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreePassCircle/index.ts: -------------------------------------------------------------------------------- 1 | import ThreePassCircle from './ThreePassCircle.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreePassCircle.install = (app: App) => { 4 | app.component(ThreePassCircle.name, ThreePassCircle); 5 | return app; 6 | }; 7 | export const ElAmapThreePassCircle = ThreePassCircle as typeof ThreePassCircle & Plugin; 8 | export default ElAmapThreePassCircle; 9 | 10 | export type ElAmapThreePassCircleInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreePolygon/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | 7 | interface PolygonFeature { 8 | type: string 9 | geometry: { 10 | type: string, 11 | coordinates: any [] 12 | } 13 | properties?: { 14 | [key: string]: any 15 | } 16 | } 17 | 18 | export interface Polygon { 19 | type: string 20 | features: PolygonFeature[] 21 | properties?: any 22 | [key: string]: any 23 | } 24 | 25 | export interface MoveAnimation { 26 | duration?: number 27 | smooth: boolean 28 | } 29 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreePolygon/index.ts: -------------------------------------------------------------------------------- 1 | import ThreePolygon from './ThreePolygon.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreePolygon.install = (app: App) => { 4 | app.component(ThreePolygon.name, ThreePolygon); 5 | return app; 6 | }; 7 | export const ElAmapThreePolygon = ThreePolygon as typeof ThreePolygon & Plugin; 8 | export default ElAmapThreePolygon; 9 | 10 | export type ElAmapThreePolygonInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeVideo/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Vec { 2 | x: number 3 | y: number 4 | z: number 5 | } 6 | 7 | export interface Offset { 8 | x: number 9 | y: number 10 | } 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/ThreeVideo/index.ts: -------------------------------------------------------------------------------- 1 | import ThreeVideo from './ThreeVideo.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ThreeVideo.install = (app: App) => { 4 | app.component(ThreeVideo.name, ThreeVideo); 5 | return app; 6 | }; 7 | export const ElAmapThreeVideo = ThreeVideo as typeof ThreeVideo & Plugin; 8 | export default ElAmapThreeVideo; 9 | 10 | export type ElAmapThreeVideoInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/packages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ThreeLayer' 2 | export * from './ThreeGltf' 3 | export * from './ThreeVideo' 4 | export * from './ThreeLightAmbient' 5 | export * from './ThreeLightDirectional' 6 | export * from './ThreeLightHemisphere' 7 | export * from './ThreeLightPoint' 8 | export * from './ThreeLightSpot' 9 | export * from './ThreePolygon' 10 | export * from './Three3Dtiles' 11 | -------------------------------------------------------------------------------- /src/vue-amap-extra/utils/colorUtil.ts: -------------------------------------------------------------------------------- 1 | import Color from 'color' 2 | 3 | /** 4 | * 获取16进制颜色 5 | * @param color 6 | */ 7 | export function getRgbNumber(color: string){ 8 | return Color(color).rgbNumber(); 9 | } 10 | 11 | /** 12 | * 获取颜色的透明度 13 | * @param color 14 | */ 15 | export function getAlpha(color: string){ 16 | return Color(color).alpha(); 17 | } 18 | -------------------------------------------------------------------------------- /src/vue-amap-extra/utils/threeUtil.js: -------------------------------------------------------------------------------- 1 | export function clearScene(scene) { 2 | scene.traverse(child => { 3 | clearGroup(child); 4 | }); 5 | } 6 | 7 | export function clearGroup(group) { 8 | const clearCache = (mesh) => { 9 | if (mesh.geometry) { 10 | mesh.geometry.dispose(); // 删除几何体 11 | } 12 | if (mesh.material && mesh.material.dispose) { 13 | mesh.material.dispose(); // 删除材质 14 | } 15 | if (mesh.material.texture && mesh.material.texture.dispose) { 16 | mesh.material.texture.dispose(); 17 | } 18 | }; 19 | const removeObj = (item) => { 20 | let array = item.children.filter((x) => x); 21 | array.forEach(v => { 22 | if (v.children.length) { 23 | removeObj(v); 24 | } else { 25 | if (v.isMesh) { 26 | clearCache(v); 27 | } 28 | } 29 | }); 30 | array = null; 31 | }; 32 | removeObj(group); 33 | } 34 | -------------------------------------------------------------------------------- /src/vue-amap-loca/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### @vuemap/vue-amap v2.1.2 2 | * 解决loca图层数据动态更新失效问题 3 | 4 | ### @vuemap/vue-amap v2.1.1 5 | * 销毁loca时增加关闭动画操作 6 | * 增加loca的types文件 7 | 8 | ### @vuemap/vue-amap v2.1.0 9 | * 所有组件更新为组合式API 10 | 11 | ### @vuemap/vue-amap-loca v2.0.6 12 | * 升级@vuemap/vue-amap-util版本,现在组件在给地图传递数据时会取消proxy和ref,防止后续地图使用对象时会触发循环watch,提高加载性能 13 | 14 | ### @vuemap/vue-amap-loca v2.0.5 15 | * 解决VSCODE开发时组件类型为any问题 16 | 17 | ### @vuemap/vue-amap-loca v2.0.4 18 | * 升级依赖解决vite热更新失败问题 19 | 20 | ### @vuemap/vue-amap-loca v2.0.2 21 | * 解决部分打包工具不支持index-es.js格式 22 | 23 | ### @vuemap/vue-amap-loca v2.0.1 24 | * 所有组件增加extraOptions属性,用于提供额外的扩展,这样高德地图升级初始化属性可以立即使用 25 | 26 | ### v2.0.0 27 | * 新版本发布,@vuemap/vue-amap 拆分为三个包```@vuemap/vue-amap```、```@vuemap/vue-amap-loca```、```@vuemap/vue-amap-extra``` 28 | * 升级方式请查看文档 29 | -------------------------------------------------------------------------------- /src/vue-amap-loca/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 gyy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/vue-amap-loca/README.md: -------------------------------------------------------------------------------- 1 | 2 | # @vuemap/vue-amap-loca 3 | [![npm (tag)](https://img.shields.io/npm/v/@vuemap/vue-amap-loca)](https://www.npmjs.org/package/@vuemap/vue-amap-loca) 4 | [![NPM downloads](http://img.shields.io/npm/dm/@vuemap/vue-amap-loca.svg)](https://npmjs.org/package/@vuemap/vue-amap-loca) 5 | ![JS gzip size](http://img.badgesize.io/https://unpkg.com/@vuemap/vue-amap-loca/dist/index.min.js?compression=gzip&label=gzip%20size:%20JS) 6 | [![NPM](https://img.shields.io/npm/l/@vuemap/vue-amap-loca)](https://gitee.com/guyangyang/vue-amap) 7 | [![star](https://gitee.com/guyangyang/vue-amap/badge/star.svg?theme=dark)](https://gitee.com/guyangyang/vue-amap/stargazers) 8 | 9 | ## 文档 10 | **[https://vue-amap.guyixi.cn](https://vue-amap.guyixi.cn)** 11 | 12 | > @vuemap/vue-amap-loca依赖@vuemap/vue-amap。 13 | -------------------------------------------------------------------------------- /src/vue-amap-loca/defaults.ts: -------------------------------------------------------------------------------- 1 | import { makeInstaller } from '@vuemap/vue-amap'; 2 | import Components from './component'; 3 | 4 | export default makeInstaller([...Components]); 5 | -------------------------------------------------------------------------------- /src/vue-amap-loca/index.ts: -------------------------------------------------------------------------------- 1 | import installer from './defaults'; 2 | export * from './packages'; 3 | export { default } from './defaults'; 4 | export const install = installer.install; 5 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/AmbientLight/index.ts: -------------------------------------------------------------------------------- 1 | import AmbientLight from './AmbientLight.vue'; 2 | import type {Plugin, App} from "vue"; 3 | AmbientLight.install = (app: App) => { 4 | app.component(AmbientLight.name, AmbientLight); 5 | return app; 6 | }; 7 | export const ElAmapLocaAmbientLight = AmbientLight as typeof AmbientLight & Plugin; 8 | export default ElAmapLocaAmbientLight; 9 | 10 | export type ElAmapLocaAmbientLightInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/DirectionalLight/index.ts: -------------------------------------------------------------------------------- 1 | import DirectionalLight from './DirectionalLight.vue'; 2 | import type {Plugin, App} from "vue"; 3 | DirectionalLight.install = (app: App) => { 4 | app.component(DirectionalLight.name, DirectionalLight); 5 | return app; 6 | }; 7 | export const ElAmapLocaDirectionalLight = DirectionalLight as typeof DirectionalLight & Plugin; 8 | export default ElAmapLocaDirectionalLight; 9 | 10 | export type ElAmapLocaDirectionalLightInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/GridLayer/index.ts: -------------------------------------------------------------------------------- 1 | import GridLayer from './GridLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | GridLayer.install = (app: App) => { 4 | app.component(GridLayer.name, GridLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaGrid = GridLayer as typeof GridLayer & Plugin; 8 | export default ElAmapLocaGrid; 9 | 10 | export type ElAmapLocaGridInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/HeatMapLayer/index.ts: -------------------------------------------------------------------------------- 1 | import HeatMapLayer from './HeatMapLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | HeatMapLayer.install = (app: App) => { 4 | app.component(HeatMapLayer.name, HeatMapLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaHeatmap = HeatMapLayer as typeof HeatMapLayer & Plugin; 8 | export default ElAmapLocaHeatmap; 9 | 10 | export type ElAmapLocaHeatmapInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/HexagonLayer/index.ts: -------------------------------------------------------------------------------- 1 | import HexagonLayer from './HexagonLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | HexagonLayer.install = (app: App) => { 4 | app.component(HexagonLayer.name, HexagonLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaHexagon = HexagonLayer as typeof HexagonLayer & Plugin; 8 | export default ElAmapLocaHexagon; 9 | 10 | export type ElAmapLocaHexagonInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/IconLayer/index.ts: -------------------------------------------------------------------------------- 1 | import IconLayer from './IconLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | IconLayer.install = (app: App) => { 4 | app.component(IconLayer.name, IconLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaIcon = IconLayer as typeof IconLayer & Plugin; 8 | export default ElAmapLocaIcon; 9 | 10 | export type ElAmapLocaIconInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/LaserLayer/index.ts: -------------------------------------------------------------------------------- 1 | import LaserLayer from './LaserLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | LaserLayer.install = (app: App) => { 4 | app.component(LaserLayer.name, LaserLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaLaser = LaserLayer as typeof LaserLayer & Plugin; 8 | export default ElAmapLocaLaser; 9 | 10 | export type ElAmapLocaLaserInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/LineLayer/index.ts: -------------------------------------------------------------------------------- 1 | import LineLayer from './LineLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | LineLayer.install = (app: App) => { 4 | app.component(LineLayer.name, LineLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaLine = LineLayer as typeof LineLayer & Plugin; 8 | export default ElAmapLocaLine; 9 | 10 | export type ElAmapLocaLineInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/LinkLayer/index.ts: -------------------------------------------------------------------------------- 1 | import LinkLayer from './LinkLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | LinkLayer.install = (app: App) => { 4 | app.component(LinkLayer.name, LinkLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaLink = LinkLayer as typeof LinkLayer & Plugin; 8 | export default ElAmapLocaLink; 9 | 10 | export type ElAmapLocaLinkInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/Loca/Type.ts: -------------------------------------------------------------------------------- 1 | export interface EventOptions{ 2 | hitFirst: boolean // 是否只触发第一个选中的数据,默认 true 3 | } 4 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/Loca/index.ts: -------------------------------------------------------------------------------- 1 | import Loca from './Loca.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Loca.install = (app: App) => { 4 | app.component(Loca.name, Loca); 5 | return app; 6 | }; 7 | export const ElAmapLoca = Loca as typeof Loca & Plugin; 8 | export default ElAmapLoca; 9 | 10 | export type ElAmapLocaInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PointLayer/index.ts: -------------------------------------------------------------------------------- 1 | import PointLayer from './PointLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PointLayer.install = (app: App) => { 4 | app.component(PointLayer.name, PointLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaPoint = PointLayer as typeof PointLayer & Plugin; 8 | export default ElAmapLocaPoint; 9 | 10 | export type ElAmapLocaPointInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PointLight/index.ts: -------------------------------------------------------------------------------- 1 | import PointLight from './PointLight.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PointLight.install = (app: App) => { 4 | app.component(PointLight.name, PointLight); 5 | return app; 6 | }; 7 | export const ElAmapLocaPointLight = PointLight as typeof PointLight & Plugin; 8 | export default ElAmapLocaPointLight; 9 | 10 | export type ElAmapLocaPointLightInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PolygonLayer/index.ts: -------------------------------------------------------------------------------- 1 | import PolygonLayer from './PolygonLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PolygonLayer.install = (app: App) => { 4 | app.component(PolygonLayer.name, PolygonLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaPolygon = PolygonLayer as typeof PolygonLayer & Plugin; 8 | export default ElAmapLocaPolygon; 9 | 10 | export type ElAmapLocaPolygonInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PrismLayer/index.ts: -------------------------------------------------------------------------------- 1 | import PrismLayer from './PrismLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PrismLayer.install = (app: App) => { 4 | app.component(PrismLayer.name, PrismLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaPrism = PrismLayer as typeof PrismLayer & Plugin; 8 | export default ElAmapLocaPrism; 9 | 10 | export type ElAmapLocaPrismInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PulseLineLayer/index.ts: -------------------------------------------------------------------------------- 1 | import PulseLineLayer from './PulseLineLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PulseLineLayer.install = (app: App) => { 4 | app.component(PulseLineLayer.name, PulseLineLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaPulseLine = PulseLineLayer as typeof PulseLineLayer & Plugin; 8 | export default ElAmapLocaPulseLine; 9 | 10 | export type ElAmapLocaPulseLineInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/PulseLinkLayer/index.ts: -------------------------------------------------------------------------------- 1 | import PulseLinkLayer from './PulseLinkLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | PulseLinkLayer.install = (app: App) => { 4 | app.component(PulseLinkLayer.name, PulseLinkLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaPulseLink = PulseLinkLayer as typeof PulseLinkLayer & Plugin; 8 | export default ElAmapLocaPulseLink; 9 | 10 | export type ElAmapLocaPulseLinkInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/ScatterLayer/index.ts: -------------------------------------------------------------------------------- 1 | import ScatterLayer from './ScatterLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ScatterLayer.install = (app: App) => { 4 | app.component(ScatterLayer.name, ScatterLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaScatter = ScatterLayer as typeof ScatterLayer & Plugin; 8 | export default ElAmapLocaScatter; 9 | 10 | export type ElAmapLocaScatterInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/ZMarkerLayer/index.ts: -------------------------------------------------------------------------------- 1 | import ZMarkerLayer from './ZMarkerLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ZMarkerLayer.install = (app: App) => { 4 | app.component(ZMarkerLayer.name, ZMarkerLayer); 5 | return app; 6 | }; 7 | export const ElAmapLocaZMarker = ZMarkerLayer as typeof ZMarkerLayer & Plugin; 8 | export default ElAmapLocaZMarker; 9 | 10 | export type ElAmapLocaZMarkerInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap-loca/packages/index.ts: -------------------------------------------------------------------------------- 1 | export * from './GridLayer'; 2 | export * from './HeatMapLayer'; 3 | export * from './HexagonLayer'; 4 | export * from './IconLayer'; 5 | export * from './LineLayer'; 6 | export * from './LinkLayer'; 7 | export * from './Loca'; 8 | export * from './PointLayer'; 9 | export * from './PolygonLayer'; 10 | export * from './PrismLayer'; 11 | export * from './PulseLineLayer'; 12 | export * from './PulseLinkLayer'; 13 | export * from './ScatterLayer'; 14 | export * from './ZMarkerLayer'; 15 | export * from './AmbientLight'; 16 | export * from './DirectionalLight'; 17 | export * from './PointLight'; 18 | export * from './LaserLayer'; 19 | -------------------------------------------------------------------------------- /src/vue-amap/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 gyy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/vue-amap/defaults.ts: -------------------------------------------------------------------------------- 1 | import { makeInstaller } from './utils/make-installer'; 2 | import Components from './component'; 3 | 4 | export default makeInstaller([...Components]); 5 | -------------------------------------------------------------------------------- /src/vue-amap/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useCitySearch'; 2 | export * from './useWeather'; 3 | export * from './useGeolocation'; -------------------------------------------------------------------------------- /src/vue-amap/hooks/useCitySearch.ts: -------------------------------------------------------------------------------- 1 | export interface CitySearchPromise { 2 | getLocalCity: () => Promise 3 | } 4 | 5 | /** 6 | * IP定位插件hook,用于进行粗略的基于IP定位 7 | */ 8 | export function useCitySearch () { 9 | return new Promise((resolve) => { 10 | AMap.plugin('AMap.CitySearch', function () { 11 | const citySearch = new AMap.CitySearch(); 12 | const getLocalCity = () => { 13 | return new Promise((resolve, reject) => { 14 | citySearch.getLocalCity(function (status, result) { 15 | if (status === 'complete' && result.info === 'OK') { 16 | resolve(result); 17 | } else { 18 | reject({ 19 | status, 20 | result 21 | }); 22 | } 23 | }); 24 | }); 25 | }; 26 | resolve({ 27 | getLocalCity 28 | }); 29 | }); 30 | }); 31 | } -------------------------------------------------------------------------------- /src/vue-amap/index.ts: -------------------------------------------------------------------------------- 1 | import installer from './defaults'; 2 | export * from './services'; 3 | export * from './packages'; 4 | export * from './mixins'; 5 | export { default } from './defaults'; 6 | export * from './hooks'; 7 | export * from './utils'; 8 | export const install = installer.install; 9 | -------------------------------------------------------------------------------- /src/vue-amap/mixins/index.ts: -------------------------------------------------------------------------------- 1 | export {default as registerMixin} from './register-component'; 2 | export * from './useRegister'; -------------------------------------------------------------------------------- /src/vue-amap/mixins/useEditor.ts: -------------------------------------------------------------------------------- 1 | import {useAttrs} from "vue"; 2 | import {bindInstanceEvent, eventReg, convertEventToLowerCase} from "../utils"; 3 | 4 | export function useEditor (editor: any, attrs: any){ 5 | if (!editor) return; 6 | const filters = ['addnode', 'adjust', 'removenode', 'end', 'move', 'add']; 7 | const filterSet: any = {}; 8 | Object.keys(attrs).forEach(key => { 9 | if(eventReg.test(key)){ 10 | const eventKey = convertEventToLowerCase(key); 11 | if (filters.indexOf(eventKey) !== -1) filterSet[eventKey] = attrs[key]; 12 | } 13 | 14 | }); 15 | Object.keys(filterSet).forEach(key => { 16 | bindInstanceEvent(editor, key, filterSet[key]); 17 | }); 18 | } -------------------------------------------------------------------------------- /src/vue-amap/packages/amap/index.ts: -------------------------------------------------------------------------------- 1 | import Amap from './amap.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Amap.install = (app: App) => { 4 | app.component(Amap.name, Amap); 5 | return app; 6 | }; 7 | export const ElAmap = Amap as typeof Amap & Plugin; 8 | export default ElAmap; 9 | 10 | export type ElAmapInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/ControlBar/index.ts: -------------------------------------------------------------------------------- 1 | import ControlBar from './ControlBar.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ControlBar.install = (app: App) => { 4 | app.component(ControlBar.name, ControlBar); 5 | return app; 6 | }; 7 | 8 | export const ElAmapControlControlBar = ControlBar as typeof ControlBar & Plugin; 9 | export default ElAmapControlControlBar; 10 | 11 | export type ElAmapControlControlBarInstance = InstanceType 12 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/Geolocation/index.ts: -------------------------------------------------------------------------------- 1 | import Geolocation from './Geolocation.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Geolocation.install = (app: App) => { 4 | app.component(Geolocation.name, Geolocation); 5 | return app; 6 | }; 7 | export const ElAmapControlGeolocation = Geolocation as typeof Geolocation & Plugin; 8 | export default ElAmapControlGeolocation; 9 | 10 | export type ElAmapControlGeolocationInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/HawkEye/index.ts: -------------------------------------------------------------------------------- 1 | import HawkEye from './HawkEye.vue'; 2 | import type {Plugin, App} from "vue"; 3 | HawkEye.install = (app: App) => { 4 | app.component(HawkEye.name, HawkEye); 5 | return app; 6 | }; 7 | export const ElAmapControlHawkEye = HawkEye as typeof HawkEye & Plugin; 8 | export default ElAmapControlHawkEye; 9 | 10 | export type ElAmapControlHawkEyeInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/MapType/index.ts: -------------------------------------------------------------------------------- 1 | import MapType from './MapType.vue'; 2 | import type {Plugin, App} from "vue"; 3 | MapType.install = (app: App) => { 4 | app.component(MapType.name, MapType); 5 | return app; 6 | }; 7 | export const ElAmapControlMapType = MapType as typeof MapType & Plugin; 8 | export default ElAmapControlMapType; 9 | 10 | export type ElAmapControlMapTypeInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/Scale/index.ts: -------------------------------------------------------------------------------- 1 | import Scale from './Scale.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Scale.install = (app: App) => { 4 | app.component(Scale.name, Scale); 5 | return app; 6 | }; 7 | export const ElAmapControlScale = Scale as typeof Scale & Plugin; 8 | export default ElAmapControlScale; 9 | 10 | export type ElAmapControlScaleInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/SearchBox/index.ts: -------------------------------------------------------------------------------- 1 | import SearchBox from './SearchBox.vue'; 2 | import type {Plugin, App} from "vue"; 3 | SearchBox.install = (app: App) => { 4 | app.component(SearchBox.name, SearchBox); 5 | return app; 6 | }; 7 | export const ElAmapSearchBox = SearchBox as typeof SearchBox & Plugin; 8 | export default ElAmapSearchBox; 9 | 10 | export type ElAmapSearchBoxInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/control/ToolBar/index.ts: -------------------------------------------------------------------------------- 1 | import ToolBar from './ToolBar.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ToolBar.install = (app: App) => { 4 | app.component(ToolBar.name, ToolBar); 5 | return app; 6 | }; 7 | export const ElAmapControlToolBar = ToolBar as typeof ToolBar & Plugin; 8 | export default ElAmapControlToolBar; 9 | 10 | export type ElAmapControlToolBarInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/infoWindow/InfoWindow/index.ts: -------------------------------------------------------------------------------- 1 | import InfoWindow from './InfoWindow.vue'; 2 | import type {Plugin, App} from "vue"; 3 | InfoWindow.install = (app: App) => { 4 | app.component(InfoWindow.name, InfoWindow); 5 | return app; 6 | }; 7 | export const ElAmapInfoWindow = InfoWindow as typeof InfoWindow & Plugin; 8 | export default ElAmapInfoWindow; 9 | 10 | export type ElAmapInfoWindowInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Canvas/index.ts: -------------------------------------------------------------------------------- 1 | import Canvas from './Canvas.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Canvas.install = (app: App) => { 4 | app.component(Canvas.name, Canvas); 5 | return app; 6 | }; 7 | export const ElAmapLayerCanvas = Canvas as typeof Canvas & Plugin; 8 | export default ElAmapLayerCanvas; 9 | 10 | export type ElAmapLayerCanvasInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Custom/index.ts: -------------------------------------------------------------------------------- 1 | import Custom from './Custom.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Custom.install = (app: App) => { 4 | app.component(Custom.name, Custom); 5 | return app; 6 | }; 7 | export const ElAmapLayerCustom = Custom as typeof Custom & Plugin; 8 | export default ElAmapLayerCustom; 9 | 10 | export type ElAmapLayerCustomInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/CustomXyz/CustomXyz.vue: -------------------------------------------------------------------------------- 1 | 4 | 41 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/CustomXyz/index.ts: -------------------------------------------------------------------------------- 1 | import CustomXyz from './CustomXyz.vue'; 2 | import type {Plugin, App} from "vue"; 3 | CustomXyz.install = (app: App) => { 4 | app.component(CustomXyz.name, CustomXyz); 5 | return app; 6 | }; 7 | export const ElAmapLayerCustomXyz = CustomXyz as typeof CustomXyz & Plugin; 8 | export default ElAmapLayerCustomXyz; 9 | 10 | export type ElAmapLayerCustomXyzInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/DistrictCluster/addProcess.ts: -------------------------------------------------------------------------------- 1 | if(typeof process!== 'undefined' && typeof process.env === 'undefined'){ 2 | process.env = {} 3 | } -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/DistrictCluster/index.ts: -------------------------------------------------------------------------------- 1 | import DistrictCluster from './DistrictCluster.vue'; 2 | import type {Plugin, App} from "vue"; 3 | DistrictCluster.install = (app: App) => { 4 | app.component(DistrictCluster.name, DistrictCluster); 5 | return app; 6 | }; 7 | export const ElAmapLayerDistrictCluster = DistrictCluster as typeof DistrictCluster & Plugin; 8 | export default ElAmapLayerDistrictCluster; 9 | 10 | export type ElAmapLayerDistrictClusterInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Flexible/index.ts: -------------------------------------------------------------------------------- 1 | import Flexible from './Flexible.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Flexible.install = (app: App) => { 4 | app.component(Flexible.name, Flexible); 5 | return app; 6 | }; 7 | export const ElAmapLayerFlexible = Flexible as typeof Flexible & Plugin; 8 | export default ElAmapLayerFlexible; 9 | 10 | export type ElAmapLayerFlexibleInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/GLCustom/index.ts: -------------------------------------------------------------------------------- 1 | import GLCustom from './GLCustom.vue'; 2 | import type {Plugin, App} from "vue"; 3 | GLCustom.install = (app: App) => { 4 | app.component(GLCustom.name, GLCustom); 5 | return app; 6 | }; 7 | export const ElAmapLayerGlCustom = GLCustom as typeof GLCustom & Plugin; 8 | export default ElAmapLayerGlCustom; 9 | 10 | export type ElAmapLayerGlCustomInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/HeatMap/index.ts: -------------------------------------------------------------------------------- 1 | import HeatMap from './HeatMap.vue'; 2 | import type {Plugin, App} from "vue"; 3 | HeatMap.install = (app: App) => { 4 | app.component(HeatMap.name, HeatMap); 5 | return app; 6 | }; 7 | export const ElAmapLayerHeatMap = HeatMap as typeof HeatMap & Plugin; 8 | export default ElAmapLayerHeatMap; 9 | 10 | export type ElAmapLayerHeatMapInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Image/index.ts: -------------------------------------------------------------------------------- 1 | import Image from './Image.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Image.install = (app: App) => { 4 | app.component(Image.name, Image); 5 | return app; 6 | }; 7 | export const ElAmapLayerImage = Image as typeof Image & Plugin; 8 | export default ElAmapLayerImage; 9 | 10 | export type ElAmapLayerImageInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Labels/index.ts: -------------------------------------------------------------------------------- 1 | import Labels from './Labels.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Labels.install = (app: App) => { 4 | app.component(Labels.name, Labels); 5 | return app; 6 | }; 7 | export const ElAmapLayerLabels = Labels as typeof Labels & Plugin; 8 | export default ElAmapLayerLabels; 9 | 10 | export type ElAmapLayerLabelsInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Tiles3D/index.ts: -------------------------------------------------------------------------------- 1 | import Tiles3D from './Tiles3D.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Tiles3D.install = (app: App) => { 4 | app.component(Tiles3D.name, Tiles3D); 5 | return app; 6 | }; 7 | export const ElAmapLayerTiles3d = Tiles3D as typeof Tiles3D & Plugin; 8 | export default ElAmapLayerTiles3d; 9 | 10 | export type ElAmapLayerTiles3dInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Vector/index.ts: -------------------------------------------------------------------------------- 1 | import Vector from './Vector.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Vector.install = (app: App) => { 4 | app.component(Vector.name, Vector); 5 | return app; 6 | }; 7 | export const ElAmapLayerVector = Vector as typeof Vector & Plugin; 8 | export default ElAmapLayerVector; 9 | 10 | export type ElAmapLayerVectorInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/data/Video/index.ts: -------------------------------------------------------------------------------- 1 | import Video from './Video.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Video.install = (app: App) => { 4 | app.component(Video.name, Video); 5 | return app; 6 | }; 7 | export const ElAmapLayerVideo = Video as typeof Video & Plugin; 8 | export default ElAmapLayerVideo; 9 | 10 | export type ElAmapLayerVideoInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/Buildings/index.ts: -------------------------------------------------------------------------------- 1 | import Buildings from './Buildings.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Buildings.install = (app: App) => { 4 | app.component(Buildings.name, Buildings); 5 | return app; 6 | }; 7 | export const ElAmapLayerBuildings = Buildings as typeof Buildings & Plugin; 8 | export default ElAmapLayerBuildings; 9 | 10 | export type ElAmapLayerBuildingsInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/DefaultLayer/index.ts: -------------------------------------------------------------------------------- 1 | import DefaultLayer from './DefaultLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | DefaultLayer.install = (app: App) => { 4 | app.component(DefaultLayer.name, DefaultLayer); 5 | return app; 6 | }; 7 | export const ElAmapLayerDefault = DefaultLayer as typeof DefaultLayer & Plugin; 8 | export default ElAmapLayerDefault; 9 | 10 | export type ElAmapLayerDefaultInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/DistrictLayer/index.ts: -------------------------------------------------------------------------------- 1 | import DistrictLayer from './DistrictLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | DistrictLayer.install = (app: App) => { 4 | app.component(DistrictLayer.name, DistrictLayer); 5 | return app; 6 | }; 7 | export const ElAmapLayerDistrict = DistrictLayer as typeof DistrictLayer & Plugin; 8 | export default ElAmapLayerDistrict; 9 | 10 | export type ElAmapLayerDistrictInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/IndoorMap/index.ts: -------------------------------------------------------------------------------- 1 | import IndoorMap from './IndoorMap.vue'; 2 | import type {Plugin, App} from "vue"; 3 | IndoorMap.install = (app: App) => { 4 | app.component(IndoorMap.name, IndoorMap); 5 | return app; 6 | }; 7 | export const ElAmapLayerIndoorMap = IndoorMap as typeof IndoorMap & Plugin; 8 | export default ElAmapLayerIndoorMap; 9 | 10 | export type ElAmapLayerIndoorMapInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/RoadNet/index.ts: -------------------------------------------------------------------------------- 1 | import RoadNet from './RoadNet.vue'; 2 | import type {Plugin, App} from "vue"; 3 | RoadNet.install = (app: App) => { 4 | app.component(RoadNet.name, RoadNet); 5 | return app; 6 | }; 7 | export const ElAmapLayerRoadNet = RoadNet as typeof RoadNet & Plugin; 8 | export default ElAmapLayerRoadNet; 9 | 10 | export type ElAmapLayerRoadNetInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/Satellite/index.ts: -------------------------------------------------------------------------------- 1 | import Satellite from './Satellite.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Satellite.install = (app: App) => { 4 | app.component(Satellite.name, Satellite); 5 | return app; 6 | }; 7 | export const ElAmapLayerSatellite = Satellite as typeof Satellite & Plugin; 8 | export default ElAmapLayerSatellite; 9 | 10 | export type ElAmapLayerSatelliteInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/TileLayer/index.ts: -------------------------------------------------------------------------------- 1 | import TileLayer from './TileLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | TileLayer.install = (app: App) => { 4 | app.component(TileLayer.name, TileLayer); 5 | return app; 6 | }; 7 | export const ElAmapLayerTile = TileLayer as typeof TileLayer & Plugin; 8 | export default ElAmapLayerTile; 9 | 10 | export type ElAmapLayerTileInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/official/Traffic/index.ts: -------------------------------------------------------------------------------- 1 | import Traffic from './Traffic.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Traffic.install = (app: App) => { 4 | app.component(Traffic.name, Traffic); 5 | return app; 6 | }; 7 | export const ElAmapLayerTraffic = Traffic as typeof Traffic & Plugin; 8 | export default ElAmapLayerTraffic; 9 | 10 | export type ElAmapLayerTrafficInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/standard/MapboxVectorTileLayer/index.ts: -------------------------------------------------------------------------------- 1 | import MapboxVectorTileLayer from './MapboxVectorTileLayer.vue'; 2 | import type {Plugin, App} from "vue"; 3 | MapboxVectorTileLayer.install = (app: App) => { 4 | app.component(MapboxVectorTileLayer.name, MapboxVectorTileLayer); 5 | return app; 6 | }; 7 | export const ElAmapLayerMapboxVectorTile = MapboxVectorTileLayer as typeof MapboxVectorTileLayer & Plugin; 8 | export default ElAmapLayerMapboxVectorTile; 9 | 10 | export type ElAmapLayerMapboxVectorTileInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/standard/WMS/index.ts: -------------------------------------------------------------------------------- 1 | import WMS from './WMS.vue'; 2 | import type {Plugin, App} from "vue"; 3 | WMS.install = (app: App) => { 4 | app.component(WMS.name, WMS); 5 | return app; 6 | }; 7 | export const ElAmapLayerWms = WMS as typeof WMS & Plugin; 8 | export default ElAmapLayerWms; 9 | 10 | export type ElAmapLayerWmsInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/layer/standard/WMTS/index.ts: -------------------------------------------------------------------------------- 1 | import WMTS from './WMTS.vue'; 2 | import type {Plugin, App} from "vue"; 3 | WMTS.install = (app: App) => { 4 | app.component(WMTS.name, WMTS); 5 | return app; 6 | }; 7 | export const ElAmapLayerWmts = WMTS as typeof WMTS & Plugin; 8 | export default ElAmapLayerWmts; 9 | 10 | export type ElAmapLayerWmtsInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/CircleMarker/index.ts: -------------------------------------------------------------------------------- 1 | import CircleMarker from './CircleMarker.vue'; 2 | import type {Plugin, App} from "vue"; 3 | CircleMarker.install = (app: App) => { 4 | app.component(CircleMarker.name, CircleMarker); 5 | return app; 6 | }; 7 | export const ElAmapCircleMarker = CircleMarker as typeof CircleMarker & Plugin; 8 | export default ElAmapCircleMarker; 9 | 10 | export type ElAmapCircleMarkerInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/ElasticMarker/index.ts: -------------------------------------------------------------------------------- 1 | import ElasticMarker from './ElasticMarker.vue'; 2 | import type {Plugin, App} from "vue"; 3 | ElasticMarker.install = (app: App) => { 4 | app.component(ElasticMarker.name, ElasticMarker); 5 | return app; 6 | }; 7 | export const ElAmapElasticMarker = ElasticMarker as typeof ElasticMarker & Plugin; 8 | export default ElAmapElasticMarker; 9 | 10 | export type ElAmapElasticMarkerInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/LabelMarker/index.ts: -------------------------------------------------------------------------------- 1 | import LabelMarker from './LabelMarker.vue'; 2 | import type {Plugin, App} from "vue"; 3 | LabelMarker.install = (app: App) => { 4 | app.component(LabelMarker.name, LabelMarker); 5 | return app; 6 | }; 7 | export const ElAmapLabelMarker = LabelMarker as typeof LabelMarker & Plugin; 8 | export default ElAmapLabelMarker; 9 | 10 | export type ElAmapLabelMarkerInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/Marker/index.ts: -------------------------------------------------------------------------------- 1 | import Marker from './Marker.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Marker.install = (app: App) => { 4 | app.component(Marker.name, Marker); 5 | return app; 6 | }; 7 | export const ElAmapMarker = Marker as typeof Marker & Plugin; 8 | export default ElAmapMarker; 9 | 10 | export type {MarkerMoveOptions} from './Marker.vue'; 11 | 12 | export type ElAmapMarkerInstance = InstanceType 13 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/MarkerCluster/index.ts: -------------------------------------------------------------------------------- 1 | import MarkerCluster from './MarkerCluster.vue'; 2 | import type {Plugin, App} from "vue"; 3 | MarkerCluster.install = (app: App) => { 4 | app.component(MarkerCluster.name, MarkerCluster); 5 | return app; 6 | }; 7 | export const ElAmapMarkerCluster = MarkerCluster as typeof MarkerCluster & Plugin; 8 | export default ElAmapMarkerCluster; 9 | 10 | export type ElAmapMarkerClusterInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/MassMarks/index.ts: -------------------------------------------------------------------------------- 1 | import MassMarks from './MassMarks.vue'; 2 | import type {Plugin, App} from "vue"; 3 | MassMarks.install = (app: App) => { 4 | app.component(MassMarks.name, MassMarks); 5 | return app; 6 | }; 7 | export const ElAmapMassMarks = MassMarks as typeof MassMarks & Plugin; 8 | export default ElAmapMassMarks; 9 | 10 | export type ElAmapMassMarksInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/marker/Text/index.ts: -------------------------------------------------------------------------------- 1 | import Text from './Text.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Text.install = (app: App) => { 4 | app.component(Text.name, Text); 5 | return app; 6 | }; 7 | export const ElAmapText = Text as typeof Text & Plugin; 8 | export default ElAmapText; 9 | 10 | export type ElAmapTextInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/util/MouseTool/index.ts: -------------------------------------------------------------------------------- 1 | import MouseTool from './MouseTool.vue'; 2 | import type {Plugin, App} from "vue"; 3 | MouseTool.install = (app: App) => { 4 | app.component(MouseTool.name, MouseTool); 5 | return app; 6 | }; 7 | export const ElAmapMouseTool = MouseTool as typeof MouseTool & Plugin; 8 | export default ElAmapMouseTool; 9 | 10 | export type ElAmapMouseToolInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/BezierCurve/index.ts: -------------------------------------------------------------------------------- 1 | import BezierCurve from './BezierCurve.vue'; 2 | import type {Plugin, App} from "vue"; 3 | BezierCurve.install = (app: App) => { 4 | app.component(BezierCurve.name, BezierCurve); 5 | return app; 6 | }; 7 | export const ElAmapBezierCurve = BezierCurve as typeof BezierCurve & Plugin; 8 | export default ElAmapBezierCurve; 9 | 10 | export type ElAmapBezierCurveInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/Circle/index.ts: -------------------------------------------------------------------------------- 1 | import Circle from './Circle.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Circle.install = (app: App) => { 4 | app.component(Circle.name, Circle); 5 | return app; 6 | }; 7 | export const ElAmapCircle = Circle as typeof Circle & Plugin; 8 | export default ElAmapCircle; 9 | 10 | export type ElAmapCircleInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/Ellipse/index.ts: -------------------------------------------------------------------------------- 1 | import Ellipse from './Ellipse.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Ellipse.install = (app: App) => { 4 | app.component(Ellipse.name, Ellipse); 5 | return app; 6 | }; 7 | export const ElAmapEllipse = Ellipse as typeof Ellipse & Plugin; 8 | export default ElAmapEllipse; 9 | 10 | export type ElAmapEllipseInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/GeoJSON/index.ts: -------------------------------------------------------------------------------- 1 | import GeoJSON from './GeoJSON.vue'; 2 | import type {Plugin, App} from "vue"; 3 | GeoJSON.install = (app: App) => { 4 | app.component(GeoJSON.name, GeoJSON); 5 | return app; 6 | }; 7 | export const ElAmapGeojson = GeoJSON as typeof GeoJSON & Plugin; 8 | export default ElAmapGeojson; 9 | 10 | export type ElAmapGeojsonInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/Polygon/index.ts: -------------------------------------------------------------------------------- 1 | import Polygon from './Polygon.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Polygon.install = (app: App) => { 4 | app.component(Polygon.name, Polygon); 5 | return app; 6 | }; 7 | export const ElAmapPolygon = Polygon as typeof Polygon & Plugin; 8 | export default ElAmapPolygon; 9 | 10 | export type ElAmapPolygonInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/Polyline/index.ts: -------------------------------------------------------------------------------- 1 | import Polyline from './Polyline.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Polyline.install = (app: App) => { 4 | app.component(Polyline.name, Polyline); 5 | return app; 6 | }; 7 | export const ElAmapPolyline = Polyline as typeof Polyline & Plugin; 8 | export default ElAmapPolyline; 9 | 10 | export type ElAmapPolylineInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/packages/vector/Rectangle/index.ts: -------------------------------------------------------------------------------- 1 | import Rectangle from './Rectangle.vue'; 2 | import type {Plugin, App} from "vue"; 3 | Rectangle.install = (app: App) => { 4 | app.component(Rectangle.name, Rectangle); 5 | return app; 6 | }; 7 | export const ElAmapRectangle = Rectangle as typeof Rectangle & Plugin; 8 | export default ElAmapRectangle; 9 | 10 | export type ElAmapRectangleInstance = InstanceType 11 | -------------------------------------------------------------------------------- /src/vue-amap/services/amap-api-loader.ts: -------------------------------------------------------------------------------- 1 | import AMapLoader from '@vuemap/amap-jsapi-loader'; 2 | import {merge} from 'lodash-es'; 3 | 4 | const DEFAULT_AMP_CONFIG = { 5 | 'key': '', // 申请好的Web端开发者Key,首次调用 load 时必填 6 | 'version': '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 7 | 'plugins': [], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 8 | // 'Loca': { // 是否加载 Loca, 缺省不加载 9 | // 'version': '2.0.0' // Loca 版本,缺省 1.3.2 10 | // }, 11 | serviceHost: '', 12 | securityJsCode: '' 13 | }; 14 | 15 | export default function (config : any = {}) { 16 | config = merge({}, DEFAULT_AMP_CONFIG, config); 17 | if (config.serviceHost) { 18 | (window as any)._AMapSecurityConfig = { 19 | serviceHost: config.serviceHost 20 | }; 21 | } else if (config.securityJsCode) { 22 | (window as any)._AMapSecurityConfig = { 23 | securityJsCode: config.securityJsCode 24 | }; 25 | } 26 | return AMapLoader.load(config); 27 | } 28 | 29 | export const resetJsApi = AMapLoader.reset; -------------------------------------------------------------------------------- /src/vue-amap/services/index.ts: -------------------------------------------------------------------------------- 1 | export {initAMapApiLoader, lazyAMapApiLoaderInstance, resetJsApi} from './injected-amap-api-instance'; 2 | -------------------------------------------------------------------------------- /src/vue-amap/services/injected-amap-api-instance.ts: -------------------------------------------------------------------------------- 1 | import AMapAPILoader from './amap-api-loader'; 2 | let lazyAMapApiLoaderInstance = null as any; 3 | 4 | interface AMapLoaderOptions { 5 | key: string, // 申请好的Web端开发者Key,首次调用 load 时必填 6 | version ?: string, // 指定要加载的 JSAPI 的版本,缺省时默认为 2.0.0 7 | plugins ?: string[], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 8 | Loca ?: { 9 | version ?: string 10 | }, 11 | AMapUI ?: { 12 | version?: string; // AMapUI 缺省 1.1 13 | plugins?: string[]; // 需要加载的 AMapUI ui插件 14 | }; 15 | serviceHost ?: string 16 | securityJsCode ?: string 17 | offline ?: boolean //是否离线部署 18 | } 19 | 20 | export const initAMapApiLoader = (config : AMapLoaderOptions) => { 21 | if (lazyAMapApiLoaderInstance) return; 22 | if (!lazyAMapApiLoaderInstance){ 23 | if(config.offline){ 24 | lazyAMapApiLoaderInstance = new Promise(resolve => { 25 | console.log('@vuemap/vue-amap离线部署'); 26 | resolve((window as any).AMap); 27 | }); 28 | }else{ 29 | lazyAMapApiLoaderInstance = AMapAPILoader(config); 30 | } 31 | } 32 | lazyAMapApiLoaderInstance.then(); 33 | }; 34 | export {lazyAMapApiLoaderInstance}; 35 | export {resetJsApi} from './amap-api-loader'; 36 | -------------------------------------------------------------------------------- /src/vue-amap/utils/buildHelper.ts: -------------------------------------------------------------------------------- 1 | import type {ComponentObjectPropsOptions, PropType} from "vue"; 2 | 3 | export type IPropData = Record 4 | export interface IPropOptions { 5 | type?: PropType | true | null; 6 | required?: boolean; 7 | default?: any; 8 | validator?(value: unknown, props: IPropData): boolean; 9 | } 10 | export interface ICommonProps{ 11 | // 是否显隐 12 | visible: IPropOptions 13 | // 层级 14 | zIndex: IPropOptions 15 | // 是否在更新组件后重新注册事件 16 | reEventWhenUpdate: IPropOptions 17 | // 额外参数,用于在初始化组件时提供prop中未定义的属性 18 | extraOptions: IPropOptions, 19 | } 20 | 21 | export const commonProps: ICommonProps = { 22 | visible: { 23 | type: Boolean, 24 | default: true 25 | }, 26 | zIndex: { 27 | type: Number, 28 | }, 29 | reEventWhenUpdate: { 30 | type: Boolean, 31 | default: false 32 | }, 33 | extraOptions: { 34 | type: Object 35 | }, 36 | }; 37 | 38 | /** 39 | * 合并生成基础的属性 40 | * @param props 41 | */ 42 | export const buildProps = (props: Props): Props & { 43 | [K in keyof ICommonProps]: ICommonProps[K] 44 | } => { 45 | return Object.assign({}, commonProps, props); 46 | }; 47 | -------------------------------------------------------------------------------- /src/vue-amap/utils/convert-helper.js: -------------------------------------------------------------------------------- 1 | export function toPixel(arr) { 2 | return new AMap.Pixel(arr[0], arr[1]); 3 | } 4 | 5 | export function toSize(arr) { 6 | return new AMap.Size(arr[0], arr[1]); 7 | } 8 | 9 | export function pixelTo(pixel) { 10 | if (Array.isArray(pixel)) return pixel; 11 | return [pixel.getX(), pixel.getY()]; 12 | } 13 | 14 | export function toLngLat(arr) { 15 | return new AMap.LngLat(arr[0], arr[1]); 16 | } 17 | 18 | export function lngLatTo(lngLat) { 19 | if (!lngLat) return; 20 | if (Array.isArray(lngLat)) return lngLat.slice(); 21 | return [lngLat.getLng(), lngLat.getLat()]; 22 | } 23 | 24 | /** 25 | * @param arrs 二重数组 southWest, northEast 26 | */ 27 | export function toBounds(arrs) { 28 | return new AMap.Bounds(toLngLat(arrs[0]), toLngLat(arrs[1])); 29 | } 30 | -------------------------------------------------------------------------------- /src/vue-amap/utils/eventHelper.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 给地图实例绑定事件 3 | * @param instance 4 | * @param eventName 5 | * @param handler 6 | */ 7 | export function bindInstanceEvent (instance: any, eventName: string, handler: any){ 8 | if(!instance || !instance.on){ 9 | return; 10 | } 11 | instance.on(eventName, handler); 12 | } 13 | 14 | /** 15 | * 从地图实例上移除事件 16 | * @param instance 17 | * @param eventName 18 | * @param handler 19 | */ 20 | export function removeInstanceEvent (instance: any, eventName: string, handler: any){ 21 | if(!instance || !instance.off){ 22 | return; 23 | } 24 | instance.off(eventName, handler); 25 | } -------------------------------------------------------------------------------- /src/vue-amap/utils/guid.ts: -------------------------------------------------------------------------------- 1 | export default function guid () { 2 | const s: string[] = []; 3 | const hexDigits = '0123456789abcdef'; 4 | for (let i = 0; i < 36; i++) { 5 | s[i] = hexDigits.charAt(Math.floor(Math.random() * 0x10)); 6 | } 7 | s[8] = s[13] = s[18] = s[23] = '-'; 8 | 9 | return s.join(''); 10 | } 11 | -------------------------------------------------------------------------------- /src/vue-amap/utils/index.ts: -------------------------------------------------------------------------------- 1 | export {default as guid} from './guid'; 2 | export * from './util.js'; 3 | export * from './eventHelper'; 4 | export * from './convert-helper.js'; 5 | export * from './GPSUtil'; 6 | export * from './buildHelper'; 7 | export * from './make-installer'; -------------------------------------------------------------------------------- /src/vue-amap/utils/make-installer.ts: -------------------------------------------------------------------------------- 1 | import type { App, Plugin } from 'vue'; 2 | 3 | export const makeInstaller = (components: Plugin[] = []) => { 4 | const apps: App[] = []; 5 | 6 | const install = (app: App) => { 7 | 8 | if (apps.includes(app)) return; 9 | apps.push(app); 10 | 11 | components.forEach((c) => app.use(c)); 12 | }; 13 | 14 | return { 15 | install, 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /test/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | !.* 4 | assets 5 | -------------------------------------------------------------------------------- /test/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rules: { 3 | 'no-console': 'off', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /test/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 22 | 23 | 47 | -------------------------------------------------------------------------------- /test/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/assets/logo.png -------------------------------------------------------------------------------- /test/components/Menu.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 31 | 32 | 39 | -------------------------------------------------------------------------------- /test/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import Element from 'element-plus' 3 | import {initAMapApiLoader} from '@vuemap/vue-amap/services/injected-amap-api-instance' 4 | import App from './App.vue' 5 | import 'element-plus/dist/index.css' 6 | import router from './router/index' 7 | 8 | initAMapApiLoader({ 9 | key: '65b5d1795f0b85ae604b4bf0a0b046d4', 10 | securityJsCode: 'ce237322c0174f586a9156eeb38a546b', 11 | version: '2.0', 12 | plugins: ['AMap.3DTilesLayer', 'AMap.AutoComplete', 'AMap.DistrictSearch'], 13 | Loca:{ 14 | version: '2.0' 15 | }, 16 | // offline: true 17 | }) 18 | 19 | createApp(App) 20 | .use(Element) 21 | .use(router) 22 | .mount('#app') 23 | -------------------------------------------------------------------------------- /test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vue-map/test", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "dev": "vite" 7 | }, 8 | "author": "", 9 | "license": "MIT", 10 | "dependencies": { 11 | "@vuemap/vue-amap": "workspace:*", 12 | "@vuemap/vue-amap-loca": "workspace:*", 13 | "@vuemap/vue-amap-extra": "workspace:*" 14 | }, 15 | "devDependencies": { 16 | "vite": "~5.4.0", 17 | "@vitejs/plugin-vue": "^5.1.2", 18 | "element-plus": "^2.4.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/public/gltf/ferrari.glb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/gltf/ferrari.glb -------------------------------------------------------------------------------- /test/public/hdr/nx.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/nx.hdr -------------------------------------------------------------------------------- /test/public/hdr/ny.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/ny.hdr -------------------------------------------------------------------------------- /test/public/hdr/nz.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/nz.hdr -------------------------------------------------------------------------------- /test/public/hdr/px.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/px.hdr -------------------------------------------------------------------------------- /test/public/hdr/py.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/py.hdr -------------------------------------------------------------------------------- /test/public/hdr/pz.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/hdr/pz.hdr -------------------------------------------------------------------------------- /test/public/img/qiang.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/img/qiang.jpeg -------------------------------------------------------------------------------- /test/public/screen.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/screen.jpeg -------------------------------------------------------------------------------- /test/public/test.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/test.mp4 -------------------------------------------------------------------------------- /test/public/test.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangyanggu/vue-amap/2bb06a5340e0f2e0c89b12ec81d8bebfa0912ae9/test/public/test.pbf -------------------------------------------------------------------------------- /test/views/hooks/citySearch.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /test/views/hooks/geolocation.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 34 | 35 | -------------------------------------------------------------------------------- /test/views/hooks/weather.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 24 | 25 | -------------------------------------------------------------------------------- /test/vite.config.ts: -------------------------------------------------------------------------------- 1 | import {defineConfig} from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | root: './', 7 | plugins: [vue()], 8 | server: { 9 | host: '127.0.0.1' 10 | } 11 | }) 12 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "allowJs": true, 5 | "strict": true, 6 | "module": "ES2020", 7 | "target": "ESNext", 8 | "noImplicitAny": false, 9 | "declaration": true, 10 | "moduleResolution": "Node", 11 | "esModuleInterop": true, 12 | "jsx": "preserve", 13 | "sourceMap": true, 14 | "lib": ["ESNext", "DOM"], 15 | "allowSyntheticDefaultImports": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "resolveJsonModule": true 18 | }, 19 | "files": ["./node_modules/@vuemap/amap-jsapi-types/index.d.ts", "./node_modules/@vuemap/amap-loca-types/index.d.ts"], 20 | "include": [ 21 | "src", 22 | "typings" 23 | ], 24 | "exclude": ["node_modules", "**/__test?__", "**/dist"] 25 | } 26 | -------------------------------------------------------------------------------- /tsconfig.build.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "module": "CommonJS", 6 | "target": "ESNext", 7 | "lib": ["ESNext"] 8 | }, 9 | "include": ["build/**/*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "strict": true, 5 | "module": "ES6", 6 | "target": "ES2018", 7 | "noImplicitAny": false, 8 | "declaration": false, 9 | "moduleResolution": "Node", 10 | "esModuleInterop": true, 11 | "jsx": "preserve", 12 | "sourceMap": true, 13 | "lib": ["ES2018", "DOM"], 14 | "allowSyntheticDefaultImports": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "resolveJsonModule": true, 17 | "types": ["@types/node", "@vuemap/amap-jsapi-types", "@vuemap/amap-loca-types"] 18 | }, 19 | "files": ["./node_modules/@vuemap/amap-jsapi-types/index.d.ts", "./node_modules/@vuemap/amap-loca-types/index.d.ts"], 20 | "include": [ 21 | "typings/*.d.ts" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.docs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "module": "ESNext", 6 | "types": ["@vuepress/client/types"] 7 | }, 8 | "include": ["docs/**/*.ts", "docs/**/*.vue","docs/.vuepress/**/*.ts", "docs/.vuepress/**/*.vue", "typings/**/*.d.ts"], 9 | "exclude": ["node_modules", "**/__test?__", "**/dist", "**/.cache", "**/.temp"] 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.docs.json" }, 5 | { "path": "./tsconfig.base.json" }, 6 | { "path": "./tsconfig.test.json" }, 7 | { "path": "./tsconfig.build.config.json" } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "composite": true, 5 | "module": "CommonJS", 6 | "target": "ESNext", 7 | "lib": ["ESNext","DOM"] 8 | }, 9 | "include": [ 10 | "test/**/*.ts", 11 | "test/**/*.vue", 12 | "typings" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /typings/amap.d.ts: -------------------------------------------------------------------------------- 1 | // declare let AMap: any; 2 | // declare module '@vuemap/amap-jsapi-types' 3 | // declare let Loca: any; 4 | -------------------------------------------------------------------------------- /typings/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ImportMetaEnv { 4 | readonly VITE_ASSERT_BASE_URL: string 5 | } 6 | 7 | interface ImportMeta { 8 | readonly env: ImportMetaEnv 9 | } -------------------------------------------------------------------------------- /typings/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | export {} 2 | 3 | declare module '@vue/runtime-core' { 4 | interface ComponentCustomProperties{ 5 | $amapComponent ?: any, 6 | $parentComponent ?: any 7 | renderer ?: any, 8 | camera ?: any, 9 | scene ?: any, 10 | customCoords ?: any 11 | parentInstance ?: any 12 | source ?: any 13 | lights ?: any 14 | hdr ?: any 15 | observer ?: MutationObserver | null 16 | customCoordsCenter ?: any 17 | $text ?: any 18 | register: any, 19 | mapEntity: any, 20 | needInitComponents: any, 21 | addChildComponent: any 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /typings/vue-shim.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import type { DefineComponent } from 'vue' 3 | // eslint-disable-next-line @typescript-eslint/ban-types 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /typings/vue-test-utils.d.ts: -------------------------------------------------------------------------------- 1 | import type { ComponentPublicInstance, CSSProperties } from 'vue' 2 | 3 | declare module '@vue/test-utils' { 4 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 5 | interface DOMWrapper { 6 | style: CSSProperties 7 | } 8 | 9 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 10 | interface VueWrapper { 11 | style: CSSProperties 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /typings/window.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | 3 | declare global { 4 | interface Window { 5 | process?: any; 6 | _hmt?: any; 7 | } 8 | } --------------------------------------------------------------------------------