aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/geolocation/templates
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/plugins/geolocation/templates')
-rw-r--r--mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html b/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
index 70f837ff..be608ac0 100644
--- a/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
+++ b/mediagoblin/plugins/geolocation/templates/mediagoblin/plugins/geolocation/map.html
@@ -17,14 +17,13 @@
#}
{% block geolocation_map %}
- {% if media.media_data.gps_latitude is defined
- and media.media_data.gps_latitude
- and media.media_data.gps_longitude is defined
- and media.media_data.gps_longitude %}
- <h3>{% trans %}Location{% endtrans %}</h3>
+ {% if model.location
+ and model.get_location.position
+ and "latitude" in model.get_location.position
+ and "longitude" in model.get_location.position %}
<div>
- {%- set lon = media.media_data.gps_longitude %}
- {%- set lat = media.media_data.gps_latitude %}
+ {%- set lon = model.get_location.position.longitude %}
+ {%- set lat = model.get_location.position.latitude %}
{%- set osm_url = "http://openstreetmap.org/?mlat={lat}&mlon={lon}".format(lat=lat, lon=lon) %}
<div id="tile-map" style="width: 100%; height: 196px;">
<input type="hidden" id="gps-longitude"
@@ -44,8 +43,9 @@
href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
contributors
</li><li>Imaging &copy;<a
- href="http://mapquest.com">MapQuest</a></li><li>Maps powered by
- <a href="http://leafletjs.com/"> Leaflet</a></li></ul>
+ href="https://www.openstreetmap.org">OpenStreetMap
+ contributors</a></li><li>Maps powered by
+ <a href="http://leafletjs.com/">Leaflet</a></li></ul>
</div>
<p>
<small>