[geotk] Draggable map display panel?

sorel johann johann.sorel at geomatys.fr
Wed Feb 22 13:32:05 EST 2012


Hello,

Sure we have that, from navigation (up to 4D CRS) to geometry edition, 
layer view, selection, map overlayers, style editor ... and so on ...

Maven dependency :
<groupId>org.geotoolkit.pending</groupId>
<artifactId>geotk-widgets-swing-pending</artifactId>

The class you are looking for is org.geotoolkit.gui.swing.go2.JMap2D in 
geotoolkit-pending.
You will have to create a MapContext object using MapBuilder utility class.


Plenty of examples can be found in the demo module :
http://hg.geotoolkit.org/geotoolkit-pending/file/53bf6b0f718a/demos/geotk-demo-samples/src/main/java/org/geotoolkit/pending/demo

If you are looking for something 'out of the box' then use
 > JMap2DFrame.show( mapcontext )
This will display a complete frame with map, toolbars, layer view, style 
editor ... some kind of small open-jump convinient for debugging.


If you are looking for map overlays or decorations then here is the 
package :
http://hg.geotoolkit.org/geotoolkit-pending/file/53bf6b0f718a/modules/display/geotk-widgets-swing/src/main/java/org/geotoolkit/gui/swing/go2/decoration

We call those MapDecoration, the AbstractGeometryDecoration is a good 
place to start with.
It will give you a good example of how to paint stuffs using the canvas 
MathTransforms to keep eveything correctly projected.


You can also plug objects directly in the rendering engine, it has 
several extension points.
it depends on what you are looking for :
 > Graphic objects : completely custom painted stuffs
 > GraphicBuilders : to replace the default SLD/SE rendering on maplayers
 > Decorations : to set over the map in swing widgets
 > Symbolizer : new symbolizer to extend SLD/SE

Aside all this you can use :
 > DefaultPortrayalService : to render map images
 > DefaultLegenService : to produce legends
 > DefaultGlyphService : to produce small glyphs (used in legends)
 > DefaultJasperReportService : to export more complex documents made 
with ireport
    (the rendering engine can be plugged in jasper report rendering 
pipeline, this way we obtain vector quality reports in pdf )


Demos/samples on the renderer are here :
http://hg.geotoolkit.org/geotoolkit-pending/file/53bf6b0f718a/demos/geotk-demo-samples/src/main/java/org/geotoolkit/pending/demo/rendering


Johann Sorel


On 22/02/2012 18:21, Jon Blower wrote:
> Hi Geotoolkit folk,
>
> Does Geotoolkit have a widget (JComponent or JPanel) for displaying maps?  I'm looking for something that:
>
> 1. Is draggable and zoomable (like OpenLayers)
> 2. has a geographic coordinate system
> 3. Can overlay images and other geographic features
> 4. Can detect clicks and report where the click happened in latitude/longitude coordinates.
>
> I've found ZoomPanel -perhaps there's a subclass of this somewhere in geotk-pending?
>
> Thanks in advance, Jon
>
> --
> Dr Jon Blower
> Technical Director, Reading e-Science Centre
> Environmental Systems Science Centre
> University of Reading, UK
> Tel: +44 (0)118 378 5213
> http://www.resc.reading.ac.uk
>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit



More information about the Geotoolkit mailing list