diff --git a/src/views/About.vue b/src/views/About.vue index 1007efa..893fa06 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -1,6 +1,6 @@ diff --git a/src/views/Home.vue b/src/views/Home.vue index 1790f56..6cee942 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -20,70 +20,70 @@ export default defineComponent({ } onMounted(()=>{ - window._AMapSecurityConfig={ - securityJsCode:"3eceddef3eafbf06e01107c78db2c264", - } - AMapLoader.load({key:"3b999eeef15d7b6ca6a3fd0c9531160d",version:"2.0",plugins:["AMap.PolygonEditor,AMap.AutoComplete"]}).then(AMap=>{ - map=new AMap.Map(_data.map.value,{ - viewMode:"3D", - zoom:16, - zooms:[13,16.75], - center:[103.144875, 25.482653], - layers:[ - // 卫星 - new AMap.TileLayer.Satellite(), - // 路网 - new AMap.TileLayer.RoadNet() - ], - }) - window.m=map - //多边形 - var polygon=new AMap.Polygon({ - path:[ - [103.154206, 25.482612], - [103.154297, 25.482324], - [103.154146, 25.481694], - [103.15457, 25.481461], - [103.154813, 25.482379], - [103.154555, 25.482448] - ], - strokeColor: "#FF33FF", - strokeWeight: 1, - strokeOpacity: 0.7, - fillOpacity: 0.2, - fillColor: '#1791fc', - zIndex: 50, - }) - var polygon1=new AMap.Polygon({ - path:[ - [103.145047, 25.483922], - [103.149596, 25.483689], - [103.145798, 25.480222], - ], - strokeColor: "#FF33FF", - strokeWeight: 3, - strokeOpacity: 0.7, - fillOpacity: 0.2, - fillColor: '#1791fc', - zIndex: 60, - }) - map.add([polygon,polygon1]) - var polyEditor=new AMap.PolygonEditor(map) - polyEditor.on("end",res=>{ - console.log("---------end-------------") - }) - // polyEditor.open() + // window._AMapSecurityConfig={ + // securityJsCode:"3eceddef3eafbf06e01107c78db2c264", + // } + // AMapLoader.load({key:"3b999eeef15d7b6ca6a3fd0c9531160d",version:"2.0",plugins:["AMap.PolygonEditor,AMap.AutoComplete"]}).then(AMap=>{ + // map=new AMap.Map(_data.map.value,{ + // viewMode:"3D", + // zoom:16, + // zooms:[13,16.75], + // center:[103.144875, 25.482653], + // layers:[ + // // 卫星 + // new AMap.TileLayer.Satellite(), + // // 路网 + // new AMap.TileLayer.RoadNet() + // ], + // }) + // window.m=map + // //多边形 + // var polygon=new AMap.Polygon({ + // path:[ + // [103.154206, 25.482612], + // [103.154297, 25.482324], + // [103.154146, 25.481694], + // [103.15457, 25.481461], + // [103.154813, 25.482379], + // [103.154555, 25.482448] + // ], + // strokeColor: "#FF33FF", + // strokeWeight: 1, + // strokeOpacity: 0.7, + // fillOpacity: 0.2, + // fillColor: '#1791fc', + // zIndex: 50, + // }) + // var polygon1=new AMap.Polygon({ + // path:[ + // [103.145047, 25.483922], + // [103.149596, 25.483689], + // [103.145798, 25.480222], + // ], + // strokeColor: "#FF33FF", + // strokeWeight: 3, + // strokeOpacity: 0.7, + // fillOpacity: 0.2, + // fillColor: '#1791fc', + // zIndex: 60, + // }) + // map.add([polygon,polygon1]) + // var polyEditor=new AMap.PolygonEditor(map) + // polyEditor.on("end",res=>{ + // console.log("---------end-------------") + // }) + // // polyEditor.open() - var auto = new AMap.AutoComplete({ - input:"search", - }); - setTimeout(()=>{ - auto.search('北京',(a,b)=>{ - console.log(a,"-------aaaaaa----------") - console.log(b,"----------bbbbbbb---------") - }) - },1000) - }) + // var auto = new AMap.AutoComplete({ + // input:"search", + // }); + // setTimeout(()=>{ + // auto.search('北京',(a,b)=>{ + // console.log(a,"-------aaaaaa----------") + // console.log(b,"----------bbbbbbb---------") + // }) + // },1000) + // }) }) return _data; },