parent
697f7fff29
commit
f644cc58c1
@ -0,0 +1,33 @@
|
|||||||
|
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({
|
||||||
Loading…
Reference in new issue