maxResolution not correctly set when initializing map from WMC document, p=trondmm,r=me (closes #3191)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11733 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2011-03-29 08:44:18 +00:00
parent e8f79d95b1
commit c03b23e6ee
2 changed files with 17 additions and 5 deletions

View File

@@ -269,9 +269,14 @@ OpenLayers.Format.Context = OpenLayers.Class({
*/
contextToMap: function(context, options) {
options = OpenLayers.Util.applyDefaults({
maxExtent: context.maxExtent,
projection: context.projection
maxExtent: context.maxExtent,
projection: context.projection,
units: context.units
}, options);
if (options.maxExtent) {
options.maxResolution =
options.maxExtent.getWidth() / OpenLayers.Map.TILE_WIDTH;
}
var map = new OpenLayers.Map(options);
map.addLayers(this.getLayersFromContext(context.layersContext));
map.setCenter(

File diff suppressed because one or more lines are too long