| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div>
- <div id="container">
- </div>
- </div>
- </template>
- <script>
- export default {
- name:'amapLong',
- props:["row","arriveIcon"],
- data(){
- return {
- }
- },
- mounted(){
- this.getMap();
- },
- methods:{
- getMap(){
- var _this = this;
- var map = new AMap.Map('container', {
- resizeEnable: true, //是否监控地图容器尺寸变化
- zoom:18,
- center:[_this.row.lampLng, _this.row.lampLat]
- });
- // map.setFeatures(['bg', 'road', 'building']);
- // map.setCity('长沙市');
- // map.setMapStyle("amap://styles/blue");
-
- var circle = new AMap.Marker({
- position:[_this.row.lampLng, _this.row.lampLat ],
-
- map:map,
- icon:_this.arriveIcon || "http://106.52.134.22:9080/000000-bladex/upload/20200606/diangan.png",
- autoRotation:true
- });
- map.add(circle);
-
- }
- }
- }
- </script>
- <style scoped>
- #container{
- width:600px;
- height:300px;
- }
- #container >>> .amap-icon img{
- width:71px !important;
- height:71px !important;
- }
- </style>
|