diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-10-06 15:47:21 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-02-23 17:10:05 +0000 |
commit | 032db2fbb6bd2bf0cf0cf2daa379610ab319a6a8 (patch) | |
tree | 7c23e16a551d80ebc2b3ebf05cbc5dac16e1be6e /web/js/map-toner-lite.js | |
parent | c763a5e8e78849d736f9c0cec92ee2687ac9e75d (diff) |
Support Stamen toner-lite and Bing Maps tiles.
Diffstat (limited to 'web/js/map-toner-lite.js')
-rw-r--r-- | web/js/map-toner-lite.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web/js/map-toner-lite.js b/web/js/map-toner-lite.js new file mode 100644 index 000000000..5291d0254 --- /dev/null +++ b/web/js/map-toner-lite.js @@ -0,0 +1,19 @@ +function set_map_config(perm) { + var permalink_id; + if ($('#map_permalink').length) { + permalink_id = 'map_permalink'; + } + fixmystreet.controls = [ + new OpenLayers.Control.ArgParser(), + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.PermalinkFMS(permalink_id), + new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) + ]; + fixmystreet.layer_options = [ { + maxResolution: 156543.03390625/Math.pow(2, fixmystreet.zoomOffset) + } ]; + fixmystreet.layer_name = 'toner-lite'; + + // The Stamen JS returns HTTP urls, fix that + stamen.tile.getProvider('toner-lite').url = 'https://stamen-tiles-{S}a.ssl.fastly.net/toner-lite/{Z}/{X}/{Y}.png'; +} |