Merge remote-tracking branch 'remotes/spaetz/410_OSM_attrib_v2'
This commit is contained in:
commit
11e887f274
@ -27,6 +27,9 @@ allow_registration = true
|
|||||||
## install other themes.
|
## install other themes.
|
||||||
# theme = airy
|
# theme = airy
|
||||||
|
|
||||||
|
# Should geotagged images be displayed with a map of the location?
|
||||||
|
geolocation_map_visible = false
|
||||||
|
|
||||||
[storage:queuestore]
|
[storage:queuestore]
|
||||||
base_dir = %(here)s/user_dev/media/queue
|
base_dir = %(here)s/user_dev/media/queue
|
||||||
|
|
||||||
|
@ -259,6 +259,10 @@ text-align: center;
|
|||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.media_sidebar h3 {
|
.media_sidebar h3 {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
margin: 0 0 5px;
|
margin: 0 0 5px;
|
||||||
|
@ -31,19 +31,15 @@ $(document).ready(function () {
|
|||||||
var map = new L.Map('tile-map');
|
var map = new L.Map('tile-map');
|
||||||
|
|
||||||
var mqtileUrl = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg';
|
var mqtileUrl = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg';
|
||||||
var mqtileAttrib = 'Map data © '
|
var mqtileAttrib = '<a id="osm_license_link">see map license</a>';
|
||||||
+ String(new Date().getFullYear())
|
|
||||||
+ ' OpenStreetMap contributors, CC-BY-SA.'
|
|
||||||
+ ' Imaging © '
|
|
||||||
+ String(new Date().getFullYear())
|
|
||||||
+ ' <a target="_blank" href="http://mapquest.com">MapQuest</a>.';
|
|
||||||
var mqtile = new L.TileLayer(
|
var mqtile = new L.TileLayer(
|
||||||
mqtileUrl,
|
mqtileUrl,
|
||||||
{maxZoom: 18,
|
{maxZoom: 18,
|
||||||
attribution: mqtileAttrib,
|
attribution: mqtileAttrib,
|
||||||
subdomains: '1234'});
|
subdomains: '1234'});
|
||||||
|
|
||||||
var location = new L.LatLng(latitude, longitude);
|
map.attributionControl.setPrefix('');
|
||||||
|
var location = new L.LatLng(latitude, longitude);
|
||||||
map.setView(location, 13).addLayer(mqtile);
|
map.setView(location, 13).addLayer(mqtile);
|
||||||
|
|
||||||
var marker = new L.Marker(location);
|
var marker = new L.Marker(location);
|
||||||
|
@ -33,6 +33,21 @@
|
|||||||
<input type="hidden" id="gps-latitude"
|
<input type="hidden" id="gps-latitude"
|
||||||
value="{{ lat }}" />
|
value="{{ lat }}" />
|
||||||
</div>
|
</div>
|
||||||
|
<script> <!-- pop up full OSM license when clicked -->
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#osm_license_link").click(function () {
|
||||||
|
$("#osm_attrib").slideToggle("slow");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id="osm_attrib" class="hidden"><ul><li>
|
||||||
|
Data ©<a
|
||||||
|
href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
|
||||||
|
contributors
|
||||||
|
</li><li>Imaging ©<a
|
||||||
|
href="http://mapquest.com">MapQuest</a></li><li>Maps powered by
|
||||||
|
<a href="http://leafletjs.com/"> Leaflet</a></li></ul>
|
||||||
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
{% trans -%}
|
{% trans -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user