diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-14 10:12:58 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-11-16 12:59:23 +0100 |
commit | fd79d33a877c97a26706931bdf0988469ad37504 (patch) | |
tree | 0951b0239a6f4c05dab3b418ecad83b652cd40c0 /mediagoblin/static/js | |
parent | 59e2656e1168ba65ae593dc66c97e02b5f34af70 (diff) | |
download | mediagoblin-fd79d33a877c97a26706931bdf0988469ad37504.tar.lz mediagoblin-fd79d33a877c97a26706931bdf0988469ad37504.tar.xz mediagoblin-fd79d33a877c97a26706931bdf0988469ad37504.zip |
Pop up OpenStreetMap license on demand (#410)
Only a short blurb "see map license" in the small map which will
pop up the full license text via jquery when clicked.
Adapt the license text as recommended by OpenStreetMap
http://www.openstreetmap.org/copyright and link there.
The disadvantage is that this only works when Javascript is enabled,
but as the map only works when Javascript is enabled in the first place,
this should not be too much of a limitation.
TODO: Our esteemed web designer needs to have a look at the desired color
style for this. Right now, I simply placed it in the message_warning
class. This might want fine-tuning.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/static/js')
-rw-r--r-- | mediagoblin/static/js/geolocation-map.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mediagoblin/static/js/geolocation-map.js b/mediagoblin/static/js/geolocation-map.js index de49a37d..26d94c5d 100644 --- a/mediagoblin/static/js/geolocation-map.js +++ b/mediagoblin/static/js/geolocation-map.js @@ -31,19 +31,15 @@ $(document).ready(function () { 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); |