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

David William Bitner david.bitner at gmail.com
Tue Apr 24 14:01:26 EDT 2007


Remember that with OpenLayers your map is still getting snapped to the
resolutions that you are being used by the cached layers and that the bbox
will also be adjusted to match the height/width of the image.

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?
>
>
>
>


-- 
************************************
David William Bitner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070424/3bd7bc89/attachment.html


More information about the Dev mailing list