From 3c407f500d415263519d7a2d94d327325ee382ba Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 17 Nov 2016 20:35:20 +0300 Subject: [PATCH] Added tdesktop-like static maps Closes #1262 --- app/js/directives.js | 7 ++++++- app/partials/desktop/message_attach_geo.html | 1 - app/partials/desktop/message_attach_venue.html | 1 - app/partials/desktop/short_message.html | 2 +- app/partials/mobile/message_attach_geo.html | 1 - app/partials/mobile/message_attach_venue.html | 1 - 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index 9ad94239..dea32299 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -2287,7 +2287,12 @@ angular.module('myApp.directives', ['myApp.filters']) element.attr('src', 'img/blank.gif') - var src = 'https://maps.googleapis.com/maps/api/staticmap?sensor=false¢er=' + $scope.point['lat'] + ',' + $scope.point['long'] + '&zoom=' + zoom + '&size=' + width + 'x' + height + '&scale=2&key=' + apiKey + var src = 'https://maps.googleapis.com/maps/api/staticmap?sensor=false¢er=' + $scope.point['lat'] + ',' + $scope.point['long'] + '&zoom=' + zoom + '&size=' + width + 'x' + height + '&scale=2&markers=color:red|size:big|' + $scope.point['lat'] + ',' + $scope.point['long'] + var useApiKey = false + + if (useApiKey) { + src += '&key=' + apiKey + } ExternalResourcesManager.downloadByURL(src).then(function (url) { element.attr('src', url.valueOf()) diff --git a/app/partials/desktop/message_attach_geo.html b/app/partials/desktop/message_attach_geo.html index 04bdfb18..109612e5 100644 --- a/app/partials/desktop/message_attach_geo.html +++ b/app/partials/desktop/message_attach_geo.html @@ -1,5 +1,4 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/partials/mobile/message_attach_geo.html b/app/partials/mobile/message_attach_geo.html index 9481ef17..55151964 100644 --- a/app/partials/mobile/message_attach_geo.html +++ b/app/partials/mobile/message_attach_geo.html @@ -1,5 +1,4 @@ - -