You will want to ask on the user list; although I accept private email for
quick fixes to the GeoTools documentation; the company I work for (LISAsoft)
also offers developer support allowing me to respond to customer email directly.
Emailing the user list offers others a chance to answer your question; and also
provides a record for people searching for the answer in our email archives.
Aside: WMSMapLayer is just a wrapper to show how to make WMS requests; you can
always make WMS GetMapRequests yourself (indeed that is what we do from the
uDig project which the code was written for).
As for stretching I expect that your screen dimensions and map dimensions no
longer have the same aspect ratio of width/height.
A couple options:
- supply an affine transform (rather than using rectangles)
http://docs.geotools.org/latest/userguide/tutorial/advanced/affinetransform.html
- try setting the bounds yourself
(http://docs.geotools.org/latest/userguide/library/render/map.html) using
setScreenArea and setBounds
By default it is supposed to grab the bounds provided by GeoServer? If that
results in a stretched image you may wish to check that they are published
correctly in the wms capabilities document.
--
Jody Garnett
On Saturday, 7 May 2011 at 5:37 AM, [email protected] wrote:
> Hi,
> I created a map viewer using Geotools. I'm using WMSMapLayer to get the
> image object from geoserver and add the layer to the mapcontext object.
> Mapcontext stretches the image and draws it on the JMAPPANE. WMSMaplayer does
> not provide any methods to set the bounding box.
>
> WMSMapLayer displayLayer = new WMSMapLayer(wms,wmsLayer);
> mapContext.addLayer(displayLayer);
>
> Is there any way to set boundingbox parameters for WMSMapLayer?
>
> How can i set the viewport of mapcontext to a fixed size?
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users