[udig-devel] basic methods to write a udig-plugin
gaghi
gaghi84 at gmail.com
Thu May 8 02:29:14 PDT 2008
Hi everybody, I'm new to the gis world and in particular to Udig .
I'm going to, actually i would, but I'm not sure if I will be able to do
this, develop some plugins for gis application. I worked a few on gvSIG. By
the way I'm a newbie.
What i would do is get the active layers in a map, and ,for every single
layer, get the the coordinates system in use and the bounds from which I
should deduce the correct coordinates system. For example, I know that if
(MinX > 4 && MaxX() < 20) the coordinates system is EPSG:4326.
At this point I would be able to apply this projection to the layer.
Surfing on the forum's threads I've found this code:
Map map = ApplicationGISInternal.getActiveMap();//
List <ILayer> layers = map.getMapLayers();//maybe i'm wrong somewhere, but
my eclipse says "type List is not generic; it cannot be parametrized with
arguments <ILayer> "
ILayer layer = null;
//here i'd start a for cycle to read every layer in the map, therefore
execute the operations to the layers
//something like this
for (int i=0; i<layers.size(); i++) {
layer = (ILayer)layers.get(i);
if (layer is active) {
//getBounds, calculate and apply new PROJECTION,
refresh the view
}
}
Could you tell which are the principal methods i should know to develop this
and others plugin(it would be better if you got a complete example to
explain me this)?
I am NOT asking to you for a development of my idea,but instead just any
suggestion useful for the future too.
Thank you in advance and forgive me if my english is not so good.
P.S.:the plugin should start once the user clicks on the button in the
toolbar. Therefore it shouldn't be sensitive to an event like the pression
of a button, but just start.
Regards,
--
View this message in context: http://www.nabble.com/basic-methods-to-write-a-udig-plugin-tp17123664p17123664.html
Sent from the udig-devel mailing list archive at Nabble.com.
More information about the udig-devel
mailing list