Hello GeoTools gurus out there,

Please help me display WMS and shapefile contents in the same MapContext.  I am 
having trouble adding a WMS layer to MapContext.  When I tried to run the 
example code, WMSLab:

http://svn.osgeo.org/geotools/trunk/demo/example/src/main/java/org/geotools/demo/WMSLab.java

I selected the NASA WMS server:

http://wms.jpl.nasa.gov/wms.cgi?Service=WMS&Version=1.1.1&Request=GetCapabilities

and the Blue Marble Next Generation, Global MODIS derived image.

The renderer failed and spit out the following error:

http://wms.jpl.nasa.gov/wms.cgi?SERVICE=WMS&LAYERS=BMNG&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/png&TRANSPARENT=TRUE&HEIGHT=200&REQUEST=GetMap&BBOX=-180.0,-90.0,180.0,90.0&WIDTH=400&STYLES=&SRS=EPSG:4326&VERSION=1.1.1
get map completed
16/02/2010 5:48:03 PM org.geotools.renderer.lite.StreamingRenderer paint
SEVERE: null
java.lang.NullPointerException
at 
org.geotools.renderer.lite.StreamingRenderer.queryLayer(StreamingRenderer.java:768)
at 
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1760)
at 
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:690)
at org.geotools.swing.RenderingExecutor$Task.call(RenderingExecutor.java:148)
at org.geotools.swing.RenderingExecutor$Task.call(RenderingExecutor.java:104)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Any idea what I have done wrong?  Is using MapContext the correct way to 
combine multiple WMS and shapefile contents?

Thank you very much.

Regards,
Tawan


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to