[geotk] Next step for WMS
Sam B
totalsam at hotmail.com
Thu Aug 27 03:45:08 EDT 2009
I am feeling just like being one small step away from getting a picture .....
I have the following exception :
Exception in thread "Thread-2" java.lang.NoSuchMethodError: org.opengis.referencing.operation.OperationMethod.getSourceDimensions()I
at org.geotoolkit.referencing.operation.DefaultOperationMethod.checkDimensions(DefaultOperationMethod.java:397)
at org.geotoolkit.referencing.operation.DefaultSingleOperation.<init>(DefaultSingleOperation.java:113)
at org.geotoolkit.referencing.operation.DefaultConversion.<init>(DefaultConversion.java:90)
at org.geotoolkit.referencing.operation.DefiningConversion.<init>(DefiningConversion.java:119)
at org.geotoolkit.display.canvas.ReferencedCanvas.getDisplayCRS(ReferencedCanvas.java:483)
at org.geotoolkit.display.canvas.ReferencedCanvas.getDeviceCRS(ReferencedCanvas.java:549)
at org.geotoolkit.display.canvas.ReferencedCanvas.createDerivedCRS(ReferencedCanvas.java:692)
at org.geotoolkit.display.canvas.ReferencedCanvas.setDisplayToDeviceTransform(ReferencedCanvas.java:721)
at org.geotoolkit.display.canvas.ReferencedCanvas2D.setObjectiveToDisplayTransform(ReferencedCanvas2D.java:476)
at org.geotoolkit.display2d.canvas.J2DCanvas.prepareContext(J2DCanvas.java:119)
at org.geotoolkit.display2d.canvas.J2DCanvasVolatile.render(J2DCanvasVolatile.java:197)
at org.geotoolkit.display2d.canvas.J2DCanvasVolatile.access$300(J2DCanvasVolatile.java:50)
at org.geotoolkit.display2d.canvas.J2DCanvasVolatile$DrawingThread.run(J2DCanvasVolatile.java:270)
Well, what I do to set the sizes of my objects is ("this" represents a JFrame object) :
this.setSize(400, 400);
mapWidget = new JMap2D();
mapWidget.setSize(400, 400);
context = MapBuilder.createContext(DefaultGeographicCRS.WGS84);
mapWidget.getContainer().setContext(context);
mapWidget.getCanvas().setRenderingHint(GO2Hints.KEY_MULTI_THREAD, GO2Hints.MULTI_THREAD_OFF);
mapWidget.getCanvas().setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
mapWidget.getCanvas().getController().setAutoRepaint(true);
add(mapWidget) ;
Rectangle rect = new Rectangle(0, 0, 400, 400);
GeneralEnvelope env = new GeneralEnvelope(rect.getBounds2D());
context.setAreaOfInterest(env);
Is it the right way of doing it ? I noticed in a previous email by theuns that he does a
private MapContext contextSA = ContextBuilder.buildSouthAfricaContext();
but I was not able to find the ContextBuilder. Is it an old version ?
By the way, looking at puzzle gis, I noticed that the URL for the WMS server contains the "&STYLES=null" argument, which makes the server to send a blank image.
Is it a way to get rid of this ?
Thanks in advance,
Sam
_________________________________________________________________
Participez & gagnez maintenant un voyage de rêve avec le concours Suisse de Hotmail !
https://www.hotmailsummerflirt.com/fr-ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20090827/728a06c6/attachment.html
More information about the Geotoolkit
mailing list