aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map')
-rw-r--r--modern/src/map/Map.js2
-rw-r--r--modern/src/map/PositionsMap.js4
-rw-r--r--modern/src/map/SelectedDeviceMap.js2
-rw-r--r--modern/src/map/mapUtil.js12
4 files changed, 7 insertions, 13 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index d71a40b..63e3a73 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -102,7 +102,7 @@ const Map = ({ children }) => {
{ id: 'gmapsStreets', title: t('mapGmapsStreets'), uri: styleGmapsStreets() },
{ id: 'gmapsSatellite', title: t('mapGmapsSatellite'), uri: styleGmapsSatellite() },
{ id: 'gmapsHybrid', title: t('mapGmapsHybrid'), uri: styleGmapsHybrid() },
- ], 'locationIqStreets');
+ ], 'gmapsStreets');
}, [mapTilerKey]);
useEffect(() => {
diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js
index 6bd7bcb..f69b541 100644
--- a/modern/src/map/PositionsMap.js
+++ b/modern/src/map/PositionsMap.js
@@ -112,13 +112,13 @@ const PositionsMap = ({ positions }) => {
'text-allow-overlap': true,
'text-anchor': 'bottom',
'text-offset': [0, -2],
- 'text-font': ['Roboto Regular'],
+ 'text-font': ['Roboto Bold'],
'text-size': 12,
},
paint: {
'text-color': {type: 'identity', property: 'color'},
'text-halo-color': 'white',
- 'text-halo-width': 1,
+ 'text-halo-width': 2,
},
});
map.addLayer({
diff --git a/modern/src/map/SelectedDeviceMap.js b/modern/src/map/SelectedDeviceMap.js
index 5ce6744..d05394b 100644
--- a/modern/src/map/SelectedDeviceMap.js
+++ b/modern/src/map/SelectedDeviceMap.js
@@ -16,7 +16,7 @@ const SelectedDeviceMap = () => {
useEffect(() => {
if (mapCenter) {
- map.easeTo({ center: mapCenter.position, zoom:19 });
+ map.easeTo({ center: mapCenter.position, zoom:18 });
}
}, [mapCenter]);
diff --git a/modern/src/map/mapUtil.js b/modern/src/map/mapUtil.js
index 43038ef..e93c146 100644
--- a/modern/src/map/mapUtil.js
+++ b/modern/src/map/mapUtil.js
@@ -36,19 +36,13 @@ export const prepareIcon = (background, icon, color) => {
canvas.style.height = `${background.height}px`;
const context = canvas.getContext('2d');
- if (!icon) {
- context.drawImage(background, 0, 0, canvas.width, canvas.height);
- }
+ context.drawImage(background, 0, 0, canvas.width, canvas.height);
if (icon) {
- const iconRatio = 1;
+ const iconRatio = 0.7;
const imageWidth = canvas.width * iconRatio;
const imageHeight = canvas.height * iconRatio;
- /*if (navigator.userAgent.indexOf('Firefox') > 0) {*/
- context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
- /*} else {
- context.drawImage(canvasTintImage(icon, color), (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
- }*/
+ context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
}
return context.getImageData(0, 0, canvas.width, canvas.height);