Starting to learn geotools 2.7.4.

I've got a simple application to try to generate a map from a WMS server.
I've found a map server on the web at

http://labs.metacarta.com/wms/vmap0

I can use this URL to get the capabilities of the server, not a problem.  When 
I try to get a map, however, I print out the URL from geotools

http://vmap0.tiles.osgeo.org/wms?SERVICE=WMS&LAYERS=basic&FORMAT=image%2Fpng&HEIGHT=600&TRANSPARENT=TRUE&REQUEST=GetMap&WIDTH=800&BBOX=-180.0,-90.0,180.0,90.0&STYLES=&VERSION=1.1.1

and when submitted, generates the dump below.

Questions that come up include
-       Why did the initial url change from ...com/wms/vmap0 to .com/wms and 
how can I prevent this.
-       Got the following lines to set SRS and bounding box
-                               CRSEnvelope env = new 
CRSEnvelope("EPSG:4326",minLon,minLat,maxLon,maxLat);
-                               request.setBBox(env);
-       What happened to my SRS in the final URL?  If I tweak the URL (add the 
vmap0) and submit it manually, I get a missing SRS message.

java.lang.IllegalArgumentException: im == null!
        at javax.imageio.ImageIO.write(ImageIO.java:1457)
        at javax.imageio.ImageIO.write(ImageIO.java:1521)
        at GeoTools.Test1.saveImage(Test1.java:212)
        at GeoTools.Test1$2.actionPerformed(Test1.java:132)
        at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6290)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6055)
        at java.awt.Container.processEvent(Container.java:2039)
        at java.awt.Component.dispatchEventImpl(Component.java:4653)
        at java.awt.Container.dispatchEventImpl(Container.java:2097)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
        at java.awt.Container.dispatchEventImpl(Container.java:2083)
        at java.awt.Window.dispatchEventImpl(Window.java:2482)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
        at java.awt.EventQueue.access$000(EventQueue.java:84)
        at java.awt.EventQueue$1.run(EventQueue.java:607)
        at java.awt.EventQueue$1.run(EventQueue.java:605)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at 
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
        at java.awt.EventQueue$2.run(EventQueue.java:621)
        at java.awt.EventQueue$2.run(EventQueue.java:619)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
        at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Any help would be greatly appreciated and if there is info that I should be 
providing that I'm not, please forgive this time and I'll pass along other info.

Thanks

E. Scott Stricker



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to