diff options
author | Antoine Beaupré <anarcat@koumbit.org> | 2012-08-24 17:29:41 -0400 |
---|---|---|
committer | Antoine Beaupré <anarcat@koumbit.org> | 2012-08-25 08:20:30 -0400 |
commit | 69467738ed3e066f8ac8ff13329173c3f2660cfb (patch) | |
tree | a711032901b78f7fdd01c8946aea3f7ebd03c3be /underlays | |
parent | 081fd3863698a273eb468cceec84cc0cffb10261 (diff) | |
download | ikiwiki-69467738ed3e066f8ac8ff13329173c3f2660cfb.tar ikiwiki-69467738ed3e066f8ac8ff13329173c3f2660cfb.tar.gz |
openlayers: use the provided layer name and put the source in parenthesis
Diffstat (limited to 'underlays')
-rw-r--r-- | underlays/osm/ikiwiki/osm.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/underlays/osm/ikiwiki/osm.js b/underlays/osm/ikiwiki/osm.js index 9547ee29c..05ab793eb 100644 --- a/underlays/osm/ikiwiki/osm.js +++ b/underlays/osm/ikiwiki/osm.js @@ -70,11 +70,11 @@ function mapsetup(divname, options) { } else { // OSM if (options.layers[layer] != 1) { l = options.layers[layer]; - fqdn = l.split("/")[2].split(".") - text = fqdn[fqdn.length-2] - map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap (" + text + ")", l)); + fqdn = l.split("/")[2].split("."); + text = fqdn[fqdn.length-2] + "." + fqdn[fqdn.length-1]; + map.addLayer(new OpenLayers.Layer.OSM(layer + " (" + text + ")", l)); } else { - map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)")); + map.addLayer(new OpenLayers.Layer.OSM(layer + " (Mapnik)")); } } } |