Thanx Ian. And since I am at it, what’s the correct way to reload a layer?
Gaby

From: Ian Turton <ijtur...@gmail.com<mailto:ijtur...@gmail.com>>
Date: Thursday, 4 February 2016 00:03
To: Gabriella Turek 
<gabriella.tu...@niwa.co.nz<mailto:gabriella.tu...@niwa.co.nz>>
Cc: geotools net 
<geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net>>
Subject: Re: [Geotools-gt2-users] How do I request a WMS layer with a specific 
CRS?


You need to use setSRS(String) and make sure your BBox matches

                GetMapRequest getMapRequest = wms.createGetMapRequest();
getMapRequest.addLayer(l);
getMapRequest.setBBox(l.getEnvelope(DefaultGeographicCRS.WGS84));
getMapRequest.setDimensions(200, 400);
getMapRequest.setFormat("image/png");
getMapRequest.setSRS("CRS:84");

Ian

On 2 February 2016 at 21:41, Gabriella Turek 
<gabriella.tu...@niwa.co.nz<mailto:gabriella.tu...@niwa.co.nz>> wrote:
I’d like to be able to request a WMS layer in a specific coordinate system.
Do I use the method setBoundingBoxes (CRSEnvelope boundingBox) on the
layer before I set the layer in WMSServer?
Thanx
GAby




------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users



--
Ian Turton


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to