[geotk] [Newbie] Image download and polygon drawing

johann sorel johann.sorel at geomatys.fr
Fri Aug 21 08:44:54 EDT 2009


Hi everyone,

Thanks theuns for the explications ;)

For WMS you can find what you are need in module coverage/wms in 
geotoolkit-pending.
package :  org/geotoolkit/wms/

You first need to create WMSServer and WMSMapLayer, you can add the 
maplayer in the mapcontext
after liked said theuns.
Thoses classes are not documented I'm sorry about it but they are pretty 
small and easy to understand.
I don't have the source code here or my test applications, olivier 
terral at geomatys is using thoses
classes so he might give you some more details if you need some.

If you just need to make an image without goign throw an awt/swing 
component you can use the
DefaultPortrayalService class.

johann sorel

theuns a écrit :
> HI Sam
> I builded a sample application with the guidance of johann sorel.
> I mostly uses shapefiles, so my experience with wms server and layers
> from the server is very limited.
>
> I am still new with the geotoolkit library, maybe i can point you in the
> right direction, i hope.
>
> The widget to display the gis data is JMap2D in the package
> org.geotoolkit.gui.swing.go2 in the geotoolkit-pending part like martin
> explained previously.
>
> The way it works(as i understand it) is, you build a MapContext.
> eg. MapContext context =
> MapBuilder.createContext(DefaultGeographicCRS.WGS84);
>
> Then you create a few maplayers (class is MapLayer) that you add the the
> context. This context you later on pass on to the JMap2D widget.
> eg. mapWidget.getContainer().setContext(context);
>
> Thats to display the maps, then for the drawing part, there is
> MapDecoration classes implemented, one to look at is
> AbstractGeometryDecoration.
>
> These MapDecoration classes is used like a "invisible overlay" where you
> can "draw" your drawings. 
>
> One implementation of the MapDecoration you can have a look at is, the
> AreaDecoration in the package
> org.geotoolkit.gui.swing.go2.control.information in the display module ,
> in the geotoolkit-pending part.
>
> Unfortunatily i have not yet created wms layers in geotoolkit.
>
> Hope this helps.
>
> Regards
> Theuns Heydenrych
>
>  
> On Fri, 2009-08-21 at 11:32 +0200, Sam B wrote:
>   
>> Great! Thank you!
>>
>> Sam
>>
>>
>> ______________________________________________________________________
>> Rencontrez ceux qui partagent les mêmes intérêts: Recherche d'amis
>> Messenger
>> _______________________________________________
>> Geotoolkit mailing list
>> Geotoolkit at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geotoolkit
>>     
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit
>
>   



More information about the Geotoolkit mailing list