svn-gvsig-desktop / trunk / libraries / libRemoteServices / src / org / gvsig / remoteClient / Tests / Test.java @ 3377
History | View | Annotate | Download (1.49 KB)
1 |
package org.gvsig.remoteClient.Tests; |
---|---|
2 |
|
3 |
import java.awt.geom.Rectangle2D; |
4 |
import org.gvsig.remoteClient.wms.WMSClient; |
5 |
import org.gvsig.remoteClient.wms.WMSStatus; |
6 |
|
7 |
import junit.framework.TestCase; |
8 |
|
9 |
public class Test extends TestCase |
10 |
{ |
11 |
|
12 |
public static void main(String[] args) |
13 |
{ |
14 |
WMSClient wmsclient = new WMSClient("http://orto.cth.gva.es:80/wmsconnector/com.esri.wms.Esrimap/wms_urbanismo_tematicos?"); |
15 |
//http://orto.cth.gva.es/wmsconnector/com.esri.wms.Esrimap/wms_urbanismo_tematicos?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=3&STYLES=&SRS=EPSG:4326&BBOX=-1.5597948439,37.8178641941,0.5286772976,40.8151000365&WIDTH=500&HEIGHT=500&FORMAT=image/jpeg&EXCEPTIONS=XML
|
16 |
try
|
17 |
{ |
18 |
wmsclient.connect(); |
19 |
System.out.println();
|
20 |
String[] layerNames = wmsclient.getLayerNames(); |
21 |
//System.out.println(Utilities.Vector2CS(layerNames));
|
22 |
|
23 |
WMSStatus status = new WMSStatus();
|
24 |
status.addLayerName("3");
|
25 |
// status.addLayerName("europa_rivieren");
|
26 |
// status.addStyleName("default");
|
27 |
// status.addStyleName("default");
|
28 |
status.setSrs("EPSG:4326");
|
29 |
|
30 |
Rectangle2D extent = new Rectangle2D.Double(-1.5597948439,37.8178641941,-1.5597948439-0.5286772976,37.8178641941-40.8151000365); |
31 |
|
32 |
status.setExtent(extent); |
33 |
status.setFormat("image/jpeg");
|
34 |
status.setHeight(500);
|
35 |
status.setWidth(500);
|
36 |
|
37 |
//wmsclient.getMap(status);
|
38 |
|
39 |
//wmsclient.getFeatureInfo(status,300,300);
|
40 |
|
41 |
System.out.println();
|
42 |
} |
43 |
catch(Exception e) |
44 |
{ |
45 |
System.out.println(e.getMessage());
|
46 |
} |
47 |
} |
48 |
|
49 |
} |