Showing
2 changed files
with
3 additions
and
1 deletions
src/assets/images/location.png
0 → 100644
4.86 KB
... | ... | @@ -74,6 +74,7 @@ |
74 | 74 | import moment from 'moment'; |
75 | 75 | // 导入一些静态图片,避免打包时不能正确解析 |
76 | 76 | import djx from '/@/assets/images/djx.png'; |
77 | + import locationJx from '/@/assets/images/location.png'; | |
77 | 78 | import zx from '/@/assets/images/zx.png'; |
78 | 79 | import lx from '/@/assets/images/lx.png'; |
79 | 80 | import djh from '/@/assets/images/djh.png'; |
... | ... | @@ -147,7 +148,8 @@ |
147 | 148 | if (position) { |
148 | 149 | let preMarker = null; |
149 | 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 | 153 | if (marker) { |
152 | 154 | map.removeOverlay(preMarker); |
153 | 155 | } | ... | ... |