Added tdesktop-like static maps

Closes #1262
This commit is contained in:
Igor Zhukov 2016-11-17 20:35:20 +03:00
parent 9a7cece6fc
commit 3c407f500d
6 changed files with 7 additions and 6 deletions

View File

@ -2287,7 +2287,12 @@ angular.module('myApp.directives', ['myApp.filters'])
element.attr('src', 'img/blank.gif') element.attr('src', 'img/blank.gif')
var src = 'https://maps.googleapis.com/maps/api/staticmap?sensor=false&center=' + $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&center=' + $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) { ExternalResourcesManager.downloadByURL(src).then(function (url) {
element.attr('src', url.valueOf()) element.attr('src', url.valueOf())

View File

@ -1,5 +1,4 @@
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_geopoint"> <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_geopoint">
<i class="icon icon-geo-point"></i>
<img <img
class="im_message_venue_geopoint_image" class="im_message_venue_geopoint_image"
my-geo-point-map="media.geo" my-geo-point-map="media.geo"

View File

@ -1,7 +1,6 @@
<div class="im_message_venue clearfix"> <div class="im_message_venue clearfix">
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap"> <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">
<i class="icon icon-geo-point"></i>
<img <img
class="im_message_venue_geopoint_image" class="im_message_venue_geopoint_image"
my-geo-point-map="media.geo" my-geo-point-map="media.geo"

View File

@ -50,4 +50,4 @@
</my-i18n-param> </my-i18n-param>
</span> </span>
</span><span class="im_short_message_text" ng-if="message.message.length" ng-bind-html="message.richMessage"></span> </span><span class="im_short_message_text" ng-if="message.message.length && !message.media" ng-bind-html="message.richMessage"></span>

View File

@ -1,5 +1,4 @@
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_geopoint"> <a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_geopoint">
<i class="icon icon-geo-point"></i>
<img <img
class="im_message_venue_geopoint_image" class="im_message_venue_geopoint_image"
my-geo-point-map="media.geo" my-geo-point-map="media.geo"

View File

@ -1,7 +1,6 @@
<div class="im_message_venue clearfix"> <div class="im_message_venue clearfix">
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap"> <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">
<i class="icon icon-geo-point"></i>
<img <img
class="im_message_venue_geopoint_image" class="im_message_venue_geopoint_image"
my-geo-point-map="media.geo" my-geo-point-map="media.geo"