Commit e05ab1e59c3373bde9c4dedb05d0f2e908b7fbb3

Authored by fengtao
1 parent 156e9dd1

fix:修改地理位置默认图标

@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
74 import moment from 'moment'; 74 import moment from 'moment';
75 // 导入一些静态图片,避免打包时不能正确解析 75 // 导入一些静态图片,避免打包时不能正确解析
76 import djx from '/@/assets/images/djx.png'; 76 import djx from '/@/assets/images/djx.png';
  77 + import locationJx from '/@/assets/images/location.png';
77 import zx from '/@/assets/images/zx.png'; 78 import zx from '/@/assets/images/zx.png';
78 import lx from '/@/assets/images/lx.png'; 79 import lx from '/@/assets/images/lx.png';
79 import djh from '/@/assets/images/djh.png'; 80 import djh from '/@/assets/images/djh.png';
@@ -147,7 +148,8 @@ @@ -147,7 +148,8 @@
147 if (position) { 148 if (position) {
148 let preMarker = null; 149 let preMarker = null;
149 const point = new BMap.Point(position.point.lng, position.point.lat); 150 const point = new BMap.Point(position.point.lng, position.point.lat);
150 - let marker = new BMap.Marker(point, { size: 30 }); 151 + let mapIcon = new BMap.Icon(locationJx, new BMap.Size(50, 80));
  152 + let marker = new BMap.Marker(point, { icon: mapIcon });
151 if (marker) { 153 if (marker) {
152 map.removeOverlay(preMarker); 154 map.removeOverlay(preMarker);
153 } 155 }