aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/Map.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-26 18:25:45 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-26 18:25:45 -0700
commitde199fa668b61ca1def0b8d18de8d666d8148361 (patch)
tree7eaace63676732087f2348c1201d580ba120b207 /modern/src/map/Map.js
parent698e27607bddd10a2f5b10a5ff07692a3d1f4ae0 (diff)
downloadtrackermap-web-de199fa668b61ca1def0b8d18de8d666d8148361.tar.gz
trackermap-web-de199fa668b61ca1def0b8d18de8d666d8148361.tar.bz2
trackermap-web-de199fa668b61ca1def0b8d18de8d666d8148361.zip
Implement map clustering
Diffstat (limited to 'modern/src/map/Map.js')
-rw-r--r--modern/src/map/Map.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index 8a43e97b..014268cd 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -37,9 +37,10 @@ const updateReadyValue = value => {
const initMap = async () => {
const background = await loadImage('images/background.svg');
+ map.addImage('background', await loadIcon(background), { pixelRatio: window.devicePixelRatio });
await Promise.all(deviceCategories.map(async category => {
if (!map.hasImage(category)) {
- const imageData = await loadIcon(category, background, `images/icon/${category}.svg`);
+ const imageData = await loadIcon(background, `images/icon/${category}.svg`);
map.addImage(category, imageData, { pixelRatio: window.devicePixelRatio });
}
}));