Specific marker color in moderation
This commit is contained in:
parent
6e112606bd
commit
d46608823e
@ -53,23 +53,28 @@ $(document).ready ->
|
||||
).addTo map
|
||||
|
||||
url = $(this).data 'url'
|
||||
markerColor = markerColors[idx++ %% markerColors.length]
|
||||
if location.search && url.indexOf('?') >= 0
|
||||
url += '&' + location.search.substr 1
|
||||
else
|
||||
url += location.search
|
||||
|
||||
if location.pathname.startsWith('/moderations/')
|
||||
# Marker with the proper icon
|
||||
marker = L.AwesomeMarkers.icon
|
||||
prefix: 'fa',
|
||||
icon: 'calendar',
|
||||
markerColor: 'cadetblue'
|
||||
|
||||
if location.pathname.startsWith('/moderations/')
|
||||
L.marker([coord[0], coord[1]], icon: marker).addTo map
|
||||
|
||||
$.getJSON url, (json) ->
|
||||
layer = L.markerClusterGroup(maxClusterRadius: 30).addLayer L.geoJson json,
|
||||
pointToLayer: (feature, latlng) ->
|
||||
# Marker with the proper icon
|
||||
marker = L.AwesomeMarkers.icon
|
||||
prefix: 'fa',
|
||||
icon: feature.properties.icon || 'calendar',
|
||||
markerColor: markerColor
|
||||
L.marker latlng, icon: marker
|
||||
,
|
||||
onEachFeature: (feature, layer) ->
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user