I have a swing app that uses JMapPane to display a WMSLayer. The
JMapFrame extension uses some new CursorTool extensions to draw features
with Point, LineString and Polygon geometry attributes and add it to the
MapPane using a FeatureLayer. I am successfully using this to
graphically enter a filter Geometry in WKT form to do spatial filter
searches in my application.
The main issue that remains is that I get the following NPE on random
occasions while drawing a Polygon. Can any one suggest what could
trigger this NPE in the JDK java2d code and what I can do to debug and
work around it?
java.lang.NullPointerException
at sun.java2d.pipe.LoopPipe.draw(LoopPipe.java:191)
at
sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2383)
at
org.geotools.renderer.lite.StyledShapePainter.paint(StyledShapePainter.java:193)
at
org.geotools.renderer.lite.StreamingRenderer$PaintShapeRequest.execute(StreamingRenderer.java:3400)
at
org.geotools.renderer.lite.StreamingRenderer$PainterThread.run(StreamingRenderer.java:3590)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Thanks for your help and for the terrific geotools libraries.
On 04/01/2013 12:19 PM, Farrukh Najmi wrote:
>> Hi Guys,
>>
>> I am wondering if any one has any sample code to share that draws
>> points, lines and polygons on a map and allows basic editing of such
>> geometries (perhaps just dragging and moving them). Here is an example
>> in javascript with openlayers that is very much what I am looking for in
>> Java / geotools:
>>
>> http://openlayers.org/dev/examples/drag-feature.html
>>
>> Thanks for your help.
>>
>
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users