You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wxjt-asset-web/patches/avue-plugin-map+1.0.1.patch

34 lines
1.1 KiB

diff --git a/node_modules/avue-plugin-map/packages/map/src/main.vue b/node_modules/avue-plugin-map/packages/map/src/main.vue
index 877fc0a..4d8e385 100644
--- a/node_modules/avue-plugin-map/packages/map/src/main.vue
+++ b/node_modules/avue-plugin-map/packages/map/src/main.vue
@@ -174,8 +174,11 @@ export default {
});
},
init (callback) {
+ const satellite = new AMap.TileLayer.Satellite();
+ const roadNet = new AMap.TileLayer.RoadNet();
this.map = new window.AMap.Map("map__container", {
zoom: 13,
+ layers: [satellite, roadNet],
center: (() => {
if (this.longitude && this.latitude) {
return [this.longitude, this.latitude];
@@ -183,9 +186,16 @@ export default {
})()
});
this.initPoip();
+ this.initToolbar();
this.addClick();
callback();
},
+ initToolbar () {
+ this.map.plugin(["AMap.ToolBar"],() => {
+ //加载工具条
+ this.map.addControl(new AMap.ToolBar());
+ });
+ },
initPoip () {
window.AMapUI.loadUI(["misc/PoiPicker"], PoiPicker => {
var poiPicker = new PoiPicker({