Changeset 0418ec7 in osmose-frontend


Ignore:
Timestamp:
Mar 1, 2014 11:08:40 AM (6 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
92b26d3
Parents:
d284b5e
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (09/02/2014 22:51:27)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (01/03/2014 11:08:40)
Message:

Fix default layer

Location:
static/map
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • static/map/layers.js

    rf6a2ac9 r0418ec7  
    44  'MapQuest Open': L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {subdomains: '123', attribution: osmAttribution + " - Tiles Courtesy of <a href=\"http://www.mapquest.com/\" target=\"_blank\">MapQuest</a> <img src=\"http://developer.mapquest.com/content/osm/mq_logo.png\">"}), 
    55  'ÖPNV Karte': L.tileLayer('http://tile.memomaps.de/tilegen/{z}/{x}/{y}.png'), 
    6   'Bing': new L.BingLayer('AmQcQsaJ4WpRqn2_k0rEToboqaM1ind8HMmM0XwKwW9R8bChmHEbczHwjnjFpuNP', {type: 'Aerial'}), 
     6  'Bing': L.bingLayer('AmQcQsaJ4WpRqn2_k0rEToboqaM1ind8HMmM0XwKwW9R8bChmHEbczHwjnjFpuNP', {type: 'Aerial'}), 
    77  'White background': L.tileLayer('http://a.layers.openstreetmap.fr/blanc.png'), 
    88  'Mapnik-osmfr': L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {attribution: osmAttribution}), 
  • static/map/map.js

    rf6a2ac9 r0418ec7  
    3333  }); 
    3434  map.addControl(permalink); 
     35 
     36  function getUrlVars() { 
     37    var vars = [], hash; 
     38    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); 
     39    for(var i = 0; i < hashes.length; i++) { 
     40        hash = hashes[i].split('='); 
     41        vars.push(hash[0]); 
     42        vars[hash[0]] = hash[1]; 
     43    } 
     44    return vars; 
     45  } 
     46 
     47  if (!getUrlVars()['overlays']) { 
     48    map.addLayer(osmoseLayer); 
     49  } 
    3550 
    3651  $.ajax({ 
Note: See TracChangeset for help on using the changeset viewer.