Hello everybody,
i'm currently trying to integrate the uDig api in an existing RCP
application. The goal is to replace the currently used but outdated OpenMap
api.

Following the tool-view tutorial i was able to show a first map view in my
application using the DefaultMapViewPart. But before i go further i would
appreciate some hints, just to prevent reinventing the wheel.

My scenario is as follows:
- i need a single view in my application displaying a map
- fixed set of  "background" layers displaying data from ESRI shape files
- the "foreground" layers should display my own data/features which are
generated in memory
- my data consist of name (for labels), lat/lon coordinates (WGS 84), range
information in nautical miles
- my features should be rendered in one layer with e.g. a small square
marking the position and on a second one with a circle with radius
calculated by the range information
- if user double clicks on such a feature i want to show an dialog
containing more information
- if the viewport of the map changes (by changing the scale or panning
around on the map, i need to calculate a list of the currently displayed
features (my data only)

My main questions at the moment are:
1) How can i programmatically change the style of the shape file layers
(fill and line color)?
2) I can create a List<SimpleFeature> from my data like in the GeoTools
csv2shp tutorial. But how can i add a layer for this to the map? Do i need
to write my own renderer? I think i'm missing some step here.
3) For user interaction (double click) i would create a Tool extending
SimpleTool and query for the clicked feature via a bounding box like in the
SendAlertTool example. Would that be correct?
4) Would an IMapListener be the correct way to handle the viewport changes
as described above? Or would an IViewportModelListener be a better way?
5) If my data changes (elements added/removed) is there an automatic way to
refresh the map or must i explicitly call map.getRenderManager().refresh() ?

I know the learning curve for uDig/GeoTools is very steep but i'm certain i
would find solutions in the sources, but i would be thankful for any hint...

Greetings
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to