Use nicer markers
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 753 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 2.1 KiB |
BIN
app/assets/images/marker-yellow.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
|
@ -60,7 +60,7 @@ $(document).ready(function () {
|
||||||
map.removeLayer(marker);
|
map.removeLayer(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
marker = L.marker(centre, {icon: getArrowIcon()}).addTo(map);
|
marker = L.marker(centre).addTo(map);
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateLocation() {
|
function updateLocation() {
|
||||||
|
|
|
@ -112,19 +112,11 @@ function createMap(divName, options) {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArrowIcon() {
|
|
||||||
return L.icon({
|
|
||||||
iconUrl: <%= asset_path('arrow.png').to_json %>,
|
|
||||||
iconSize: [25, 22],
|
|
||||||
iconAnchor: [22, 20]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function getUserIcon(url) {
|
function getUserIcon(url) {
|
||||||
return L.icon({
|
return L.icon({
|
||||||
iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
|
iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
|
||||||
iconSize: [21, 25],
|
iconSize: [19, 25],
|
||||||
iconAnchor: [12, 27]
|
iconAnchor: [11, 26]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|