[OpenLayers-Dev] Exact bounding box of WMS untiled request

Erik Uzureau erik.uzureau at metacarta.com
Tue Apr 24 14:49:26 EDT 2007

When I open your page, map2 is giving me a different max extent.
If you want to display exactly the maxextent and nothing else, then
you're right to set the maxextent and ratio as you've done, but you'll
also have to set the dimensions of the map div itself to be the same
as those of your maxextent. This is not the case right now.

The ratio parameter for the untiled layer is relative to the size of the


On 4/24/07, Ed Fialkowski <edfialk at gmail.com> wrote:
> I just noticed the ratio field and was about to mention that.
> It seems there is still a bit of a buffer for me though.
> Here's what I do:
> var bbox = new OpenLayers.Bounds(-145,25,-25,75);
> map2 = new OpenLayers.Map('map2', {maxExtent: bbox, controls: [new
> OpenLayers.Control.PanZoom(), new OpenLayers.Control.MouseToolbar(new
> OpenLayers.Pixel(6,150))] });
> var wms2 = new OpenLayers.Layer.WMS.Untiled( "Borders", bdr_url, {layers:
> 'OpenLayers', format:"image/png"});
> wms2.ratio = 1;
> map2.addLayer(wms2);
> Then, when I view the image location, the bbox is: -162.5,10.029297,-27.5,
> 69.970703.
> It's the same every time.
> My site is at http://niceguy.wustl.edu/openlayers.  It's a visual
> comparison tool for different emissions data.  Ignore the big pink image if
> it's there.
> The bottom two images should work where you can see the image request.
> Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070424/c0151441/attachment.html

More information about the Dev mailing list