Skip to content

Commit dc3dabb

Browse files
committed
fix: Map picker marker not found icon error
Add custom map picker icon.
1 parent 3609fbb commit dc3dabb

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ frontend/express/public/sdk/
1919
**/node_modules
2020
bin/scripts/nghttp2
2121
frontend/express/public/images/*/
22+
!frontend/express/public/images/leaflet/
2223
!frontend/express/public/images/dashboard/
2324
!frontend/express/public/images/flags/
2425
!frontend/express/public/images/management/
Loading

frontend/express/public/javascripts/countly/vue/components/vis.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global Promise, Vue, countlyCommon, countlyLocation, _merge, CommonConstructor, countlyGlobal, Vue2Leaflet, CV, moment */
1+
/* global Promise, Vue, countlyCommon, countlyLocation, _merge, CommonConstructor, countlyGlobal, Vue2Leaflet, CV, moment, L */
22

33
// _merge is Lodash merge - /frontend/express/public/javascripts/utils/lodash.merge.js
44

@@ -1965,6 +1965,7 @@
19651965
'l-tile-layer': Vue2Leaflet.LTileLayer,
19661966
'l-marker': Vue2Leaflet.LMarker,
19671967
'l-circle': Vue2Leaflet.LCircle,
1968+
'l-icon': Vue2Leaflet.LIcon,
19681969
},
19691970
props: {
19701971
value: {
@@ -2000,6 +2001,11 @@
20002001
userCenterCoordinates: null,
20012002
tileFeed: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
20022003
tileAttribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
2004+
markerIcon: L.icon({
2005+
iconUrl: '/images/leaflet/marker-icon.svg',
2006+
iconSize: [32, 32],
2007+
iconAnchor: [ 16, 32],
2008+
}),
20032009
MI_TO_KM_RATIO: 1.60934,
20042010
KM_TO_M_RATIO: 1000,
20052011
RadiusUnitEnum: {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<l-map ref="lmap" :style="{height: height || '450px', width: '100%'}" :zoom="dynamicZoom" :center="centerCoordinates">
22
<l-tile-layer pane="tilePane" :url="tileFeed" :no-wrap="true" :attribution="tileAttribution"></l-tile-layer>
3-
<l-marker v-if="value" :lat-lng="value"></l-marker>
3+
<l-marker v-if="value" :lat-lng="value" :icon="markerIcon"></l-marker>
44
<l-circle v-if="value && radius" :lat-lng="value" color="red" :radius="radiusInMeters"></l-circle>
55
</l-map>

0 commit comments

Comments
 (0)