openlayers / ol2

OpenLayers v2 - deprecated!
Other
1.48k stars 771 forks source link

Map extent is increased after setting base layer #1528

Open balab2020 opened 6 years ago

balab2020 commented 6 years ago

We are using release version and rendering WMS, OSM, Google and Bing maps. WMS layer maps are configured with (-180, -90, 180, 90) bounds. When we create map control and add WMS layer map as base layer, the extent values are changed like -180,-101.74331550802,180,101.74331550802 (-90,90 -> increased by 13 number) and it is inconsistent with browser window size.

Any one faced similar issue or any resolution? Thanks in advance.

default options to map control { fractionalZoom: true, fallThrough: true, tileManager: null, maxResolution: "auto", projection:"EPSG:4326" maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90), restrictedExtent: new OpenLayers.Bounds(-180, -90, 180, 90), units: "degrees", reset: true, tileSize: new OpenLayers.Size(256, 256) }

Please let me know if any information required?