mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 13:36:20 +00:00
Implemented map to show visits from every city
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import L from 'leaflet';
|
||||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
||||
import marker from 'leaflet/dist/images/marker-icon.png';
|
||||
import markerShadow from 'leaflet/dist/images/marker-shadow.png';
|
||||
|
||||
const DEFAULT_TIMEOUT_DELAY = 2000;
|
||||
|
||||
export const stateFlagTimeout = (setState, flagName, initialValue = true, delay = DEFAULT_TIMEOUT_DELAY) => {
|
||||
@@ -17,3 +22,13 @@ export const determineOrderDir = (clickedField, currentOrderField, currentOrderD
|
||||
|
||||
return currentOrderDir ? newOrderMap[currentOrderDir] : 'ASC';
|
||||
};
|
||||
|
||||
export const fixLeafletIcons = () => {
|
||||
delete L.Icon.Default.prototype._getIconUrl;
|
||||
|
||||
L.Icon.Default.mergeOptions({
|
||||
iconRetinaUrl: marker2x,
|
||||
iconUrl: marker,
|
||||
shadowUrl: markerShadow,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user