Browse Source

Added tdesktop-like static maps

Closes #1262
master
Igor Zhukov 8 years ago
parent
commit
3c407f500d
  1. 7
      app/js/directives.js
  2. 1
      app/partials/desktop/message_attach_geo.html
  3. 1
      app/partials/desktop/message_attach_venue.html
  4. 2
      app/partials/desktop/short_message.html
  5. 1
      app/partials/mobile/message_attach_geo.html
  6. 1
      app/partials/mobile/message_attach_venue.html

7
app/js/directives.js

@ -2287,7 +2287,12 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -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&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) {
element.attr('src', url.valueOf())

1
app/partials/desktop/message_attach_geo.html

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

1
app/partials/desktop/message_attach_venue.html

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

2
app/partials/desktop/short_message.html

@ -50,4 +50,4 @@ @@ -50,4 +50,4 @@
</my-i18n-param>
</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>

1
app/partials/mobile/message_attach_geo.html

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

1
app/partials/mobile/message_attach_venue.html

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

Loading…
Cancel
Save