var map = new L.Map('tile-map');
var mqtileUrl = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg';
- var mqtileAttrib = 'Map data © '
- + String(new Date().getFullYear())
- + ' OpenStreetMap contributors, CC-BY-SA.'
- + ' Imaging © '
- + String(new Date().getFullYear())
- + ' <a target="_blank" href="http://mapquest.com">MapQuest</a>.';
+ var mqtileAttrib = '<a id="osm_license_link">see map license</a>';
var mqtile = new L.TileLayer(
mqtileUrl,
{maxZoom: 18,
attribution: mqtileAttrib,
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);
var marker = new L.Marker(location);
<input type="hidden" id="gps-latitude"
value="{{ lat }}" />
</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>
<small>
{% trans -%}