From 22f4abd82db604e2d0dca8fdce21960146a4f499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 30 May 2020 17:56:36 +0200 Subject: [PATCH] MAPG-80 mark guessable area on static maps --- public/static/js/maps.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/static/js/maps.js b/public/static/js/maps.js index 394c6c8..0c63ce3 100644 --- a/public/static/js/maps.js +++ b/public/static/js/maps.js @@ -8,9 +8,12 @@ var imgContainer = imgContainers[i]; var imgSrc = 'https://maps.googleapis.com/maps/api/staticmap?size=350x175&' + - 'scale=' + (window.devicePixelRatio >= 2 ? 2 : 1) + '&' + - 'visible=' + imgContainer.dataset.boundSouthLat + ',' + imgContainer.dataset.boundWestLng + '|' + - imgContainer.dataset.boundNorthLat + ',' + imgContainer.dataset.boundEastLng + + 'scale=' + (window.devicePixelRatio >= 2 ? 2 : 1) + '&path=color:0x0000ff40|weight:3|fillcolor:0x0000ff20|' + + imgContainer.dataset.boundSouthLat + ',' + imgContainer.dataset.boundWestLng + '|' + + imgContainer.dataset.boundNorthLat + ',' + imgContainer.dataset.boundWestLng + '|' + + imgContainer.dataset.boundNorthLat + ',' + imgContainer.dataset.boundEastLng + '|' + + imgContainer.dataset.boundSouthLat + ',' + imgContainer.dataset.boundEastLng + '|' + + imgContainer.dataset.boundSouthLat + ',' + imgContainer.dataset.boundWestLng + '&key=' + GOOGLE_MAPS_JS_API_KEY; imgContainer.style.backgroundImage = 'url("' + imgSrc + '")'; -- 2.45.2