diff options
author | Struan Donald <struan@exo.org.uk> | 2011-07-26 16:57:08 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-07-26 16:57:08 +0100 |
commit | 54066cd1387643dd6c6cb3040c520bee66881fd7 (patch) | |
tree | eda84b3f347220ed12de3aa690116148287891bd /web/js/map-tilma-ol.js | |
parent | 8146bad18eeaab658871dd28eb38199a5d068395 (diff) | |
parent | 198fcef62892fe0b2fbb3ea8a080fca87843445e (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts:
perllib/FixMyStreet/App/Controller/Admin.pm
perllib/FixMyStreet/App/Controller/JSON.pm
perllib/FixMyStreet/Map/Tilma/Original.pm
web/css/core.css
Diffstat (limited to 'web/js/map-tilma-ol.js')
-rw-r--r-- | web/js/map-tilma-ol.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/web/js/map-tilma-ol.js b/web/js/map-tilma-ol.js deleted file mode 100644 index 5230a5d2c..000000000 --- a/web/js/map-tilma-ol.js +++ /dev/null @@ -1,41 +0,0 @@ -function set_map_config(perm) { - fixmystreet.controls = [ - new OpenLayers.Control.ArgParser(), - perm, - new OpenLayers.Control.Navigation(), - new OpenLayers.Control.PanPanel() - ]; - fixmystreet.map_type = OpenLayers.Layer.Tilma; - fixmystreet.layer_options = { - maxResolution: fixmystreet.maxResolution, - tileSize: new OpenLayers.Size(fixmystreet.tilewidth, fixmystreet.tileheight), - map_type: fixmystreet.tile_type, - numZoomLevels: 1, - zoomOffset: 0 - }; -} - -OpenLayers.Layer.Tilma = OpenLayers.Class(OpenLayers.Layer.XYZ, { - initialize: function(name, options) { - var url = "http://tilma.mysociety.org/tileserver/${type}/${x},${y}/png"; - options = OpenLayers.Util.extend({ - transitionEffect: "resize", - numZoomLevels: 1, - projection: "EPSG:27700", - units: "m", - maxExtent: new OpenLayers.Bounds(0, 0, 700000, 1300000) - }, options); - var newArguments = [name, url, options]; - OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments); - }, - - getURL: function (bounds) { - var res = this.map.getResolution(); - var x = Math.round(bounds.left / (res * this.tileSize.w)); - var y = Math.round(bounds.bottom / (res * this.tileSize.h)); - var path = OpenLayers.String.format(this.url, {'x': x, 'y': y, 'type': this.map_type}); - return path; - }, - - CLASS_NAME: "OpenLayers.Layer.Tilma" -}); |