diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-08 21:21:25 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-08 21:21:25 -0600 |
commit | 670721d5527e4ed13746ec133c841fe36fb326f9 (patch) | |
tree | e089d8bd2816f5668883ed6825535e85eeb9c583 /modern/src/map/mapUtil.js | |
parent | e39d0bad3920681873ffac0907852169f2d18ead (diff) | |
download | etbsa-traccar-web-670721d5527e4ed13746ec133c841fe36fb326f9.tar.gz etbsa-traccar-web-670721d5527e4ed13746ec133c841fe36fb326f9.tar.bz2 etbsa-traccar-web-670721d5527e4ed13746ec133c841fe36fb326f9.zip |
Removed gray circles from device list, decreased map zoom by 1, default map is now Google Maps Streets
Diffstat (limited to 'modern/src/map/mapUtil.js')
-rw-r--r-- | modern/src/map/mapUtil.js | 12 |
1 files changed, 3 insertions, 9 deletions
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); |