Opened 12 years ago
Closed 12 years ago
#1093 closed defect (fixed)
When custom projection & resolutions set to map config, view and edit mode map does not work
Reported by: | fxp | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | v2.10.0 RC0 |
Component: | General | Version: | v2.8.0RC1 |
Keywords: | Cc: |
Description
Sample config:
GeoNetwork.map.PROJECTION = "EPSG:28992"; GeoNetwork.map.EXTENT = new OpenLayers.Bounds(-285401.92,22598.08,595401.92,903401.92); GeoNetwork.map.RESOLUTIONS = [3440.64,1720.32,860.16,430.08,215.04,107.52,53.76,26.88,13.44,6.72,3.36,1.68,0.84];
Error is:
Uncaught TypeError: Cannot read property 'length' of undefined Layer.js:1143 OpenLayers.Layer.OpenLayers.Class.getResolutionForZoom Layer.js:1143 OpenLayers.Layer.OpenLayers.Class.getResolution Layer.js:1079 OpenLayers.Map.OpenLayers.Class.getResolution Map.js:2168 OpenLayers.Map.OpenLayers.Class.calculateBounds Map.js:1536 OpenLayers.Layer.OpenLayers.Class.getExtent Layer.js:1093 OpenLayers.Layer.OpenLayers.Class.redraw Layer.js:551 OpenLayers.Layer.HTTPRequest.OpenLayers.Class.redraw HTTPRequest.js:149 OpenLayers.Map.OpenLayers.Class.setBaseLayer Map.js:1237 OpenLayers.Map.OpenLayers.Class.addLayer Map.js:1033 createMap ExtentMap.js:140 initMapDiv
Add resolutions parameter to Maps created by ExtentMap solves the issue.
Note:
See TracTickets
for help on using tickets.
Fixed in d3f2f8a0aaf5a4a4daa6f0537e3df200a17d954a