Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] doubt in plugin

Thinking of where I can find you an example....

These steps here:
http://udig.refractions.net/confluence/display/ADMIN/09+Libs+Refresh.xml+Ant+Script
 
The section on "making new jars avaialble on the classpath" document how to do this for the libs module; this is the same steps you should be doing in your own code.

The section on packages to add is in the top left; what you are looking for is in the bottom right of the screen.

Jody

On Wed, Mar 4, 2009 at 8:51 PM, prasad babu <prasad.konduru2@xxxxxxxxx> wrote:
Hi Jody
 
I am very sorry, Still I am not able to connect to SQL Server. If I go to MANIFEST .MF and Runtime tab, It is asking for the package to add, not a jar, More over I tried in many ways ,But I couldn't . Please suggest me.
 
run time tab is showing my mapgraphic package, nothing else..
 
Thanks in advance
Babu.

On Tue, Mar 3, 2009 at 2:46 PM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
A couple htings:
- the sqlserver jdbc driver - to get it to show up you will need to go to the MANIFEST.MF editor; runtime tab and add the jar as something the MANIFEST.MF is publishing (from there it should update the .classpath and let you compile etc...)
- to prompt the user for something you already have the control you need; you are making a tool - when they have issued their four points you can open a dialog and ask the user for the name. If you just need the name you may even be able to use one of the built in dialogs that JFace provides
- in the future you may want to extend your tool to allow them to click on existing gates and change the name


On Tue, Mar 3, 2009 at 5:25 PM, prasad babu <prasad.konduru2@xxxxxxxxx> wrote:
Hi Jodi
 
I have downloaded sql server jdbc driver and tried to connect through it, But I couldn't.
 
I have added that sqlserver jdbc driver jar to my mapgraphic plugin under referenced libraries, even thogh it is showing error like class not found exception (com.microsft.sqlserver.jdbcdriver), Where actullay I need to add my jar to the plugin .
 
I have a small doubt here
 
Once I create a gate then it has to ask a name for the gate on the map,and user has to enter the name for that.
how can i give the input data on the map ?
 
Hope you can help me
 
Thanks in advance
Babu

On Tue, Mar 3, 2009 at 12:50 PM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
Not a problem - it is good to build community.

And remember you did the hard work :-) I have it easy answering questions. The next step (of saving your gates to and from the database should be okay for you I guess). When you get to testing your gates against the road network you may have some questions about the JTS and the geometry classes; I can try and answer some questions, there is a jts email list,  and the javadocs are really good.

Jody

On Tue, Mar 3, 2009 at 2:51 PM, prasad babu <prasad.konduru2@xxxxxxxxx> wrote:
Hi Jody
 
I have completed my first task(creating gates), All credit goes to you.
 
Any way Thanks again
 
Babu.

On Fri, Feb 27, 2009 at 1:51 PM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
You have the right class; but unless you change the code to draw lines you will not draw lines :-)

I think rather than storing individual coordinate on the blackboard you may want to store a "gate" on the blackboard.

Make a class called gate with 4 points in it. And make your tool create gates; and you map graphic draw them.

With programming there are always many ways to do things; you should go with something you are comfortable with.

Why not start off slow and replace the mapgrpahic code (that draws a circle right now) and ask it to draw a square (just to get practice drawing squares.

Jody


On Fri, Feb 27, 2009 at 4:43 PM, prasad babu <prasad.konduru2@xxxxxxxxx> wrote:
Hi Jody
 
I have created a MapGraphic, I am able to place the coardinates now (with Blue color), But it is not drawing any lines to combine these coardiants to create a gate .
 
What I have done so far
 
1-> Make use of  net.refrations.tuorial.tool.coardinate class . (I just create model tool and added this class to that model , so that I can place some coordinates using that tool)
2->I just added a MapGraphic and I have given a name(Draw Line) to that MapGraphic
 
Step to execute
 
1-> I just added a Map to the Udig
2-> I just use the coordiante model tool to place the points
3->I just created a Map graphic to that Map
 
Now I can only see  that 4 coardinates with dark blue color on to the Map
 
Is it the right way to add map graphic? if not plese let me know the process,othere wise just send me any doucment related to this.
 
Thanks in advance 
Babu. 

On Thu, Feb 26, 2009 at 12:46 PM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
On Thu, Feb 26, 2009 at 1:17 PM, prasad babu <prasad.konduru2@xxxxxxxxx> wrote:
Hi
 
I added  a plug-in to the tool, and now I need to draw some thing on the map which conncets 4 coardinates.

So next up you can create a MapGraphic (its responsibility will be to draw the coordinates). Have a look at the code example documented here:
- http://udig.refractions.net/confluence/display/DEV/2+Training+Materials#2TrainingMaterials-MapGraphic
 
and I must restrict the size and way of the polygon or whatever... I wont allow users to draw what ever they want. I need to do some calculations while drawing a extra layer on the map.

That is fine; you can do whatever you need when drawing.
 
My actual requirement.
 
I need to work on a road map, there will be many roads , and I need to add some gantrys (means toll gates for price calculations) to the map . I just want to add a plug -in to do this process.

So what is your workflow? Are the four points representing a "tool gate"?
1. Select the "toll gate" tool; use it to draw a gate
2. During drawing you can use a DrawCommand to provide visual feedback; when the gate is done you can invalidate the draw command and add the new gate to the map blackboard. When the gate is done you can check if there is a "toll gate" mapgraphic on the map and if not you can add it; if it is already there you can refresh it
3. Create a "toll gate" mapgraphic that draws the toll gate on the screen

Is this correct? Are you really drawing a box for a toll gate; or do you need to click and snap to the nearest layer?

1-> Which class I need to extend to write an extra layer? (I extended simple tool for calulate the distance in the example,there are methods like mouse dragged  and so on..) and I also needto do an reverse engine that means I will get the data from GPS (4 Coardinates)
and I need to connect ther 4 coardinate and  display it automaticaly once I open the Map. 
 
Plese suggest me what would be the best way to do this.
 
Any ideas will be appriciated.
 
Thanks in advance
Babu


 
On Wed, Feb 25, 2009 at 10:51 AM, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
That sounds perfect; if you are intending to define a region of interest then a region of interest tool is more explicit to both you and your user. You should find that your tool can store the region of interest on the map backboad; and then your other view etc can pick it up from there as needed. The coordinate tool / coordinate map graphic example in tutorials show how to do this; and it has been used by many other teams. The DIVAGIS team used this techqniue to define a region of interest "grid" and then had a bunch of operations build around doing analysis of the points that fell into each grid square.

Jody


On Tue, Feb 24, 2009 at 7:46 PM, Despres <damien.despres@xxxxxxxxxxxx> wrote:

Thanks for your help,

 

The point is that the filter i get doesn’t contain a bounding box. Indeed, I may have only one or no rasters layer on the map.

I think what I tried to do is impossible with the Bbox selection tool, so I developped my own Bbox tool. The goal is just to define a Region of Interest.

 

 

Damien

 

 


De : udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx [mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] De la part de Jody Garnett
Envoyé : mardi 24 février 2009 06:08


À : User-friendly Desktop Internet GIS
Objet : Re: [udig-devel] BBoxSelection Listener

 

The filter geneated by the BBoxSelectionCommand is available for you .... layer.getFilter().



You can look at this data structure and get the bounding box if you like; altough the selection for a layer (ie the filter) is not always done as a bounding box.

I hope this helps.

If you need to listen to any random part of the project/map/layer/viewport model you can - the magic word you need to know is "adapters"; the best way to figure out how is to look at some of the existing add/remove listener implementations and watch how they translate a Notification (ie what adapters "listen to") into a layer change event.

I am still not sure if the various map changed, and layer changed events are worth while or if it would be easier just to use this Notification thing everywhere.

Jody

On Wed, Feb 18, 2009 at 4:35 AM, Despres <damien.despres@xxxxxxxxxxxx> wrote:

Hi all,

 

 

I’m trying to develop a plug-in that could listen to the BBoxSelectionCommand and get the bbox that have been drawn by the user with the bbox tool.

I’ve tried to add a MapListener, I catch an event but it doesn’t help:

 

 

 

activeMap.addMapListener(new IMapListener(){

            public void changed(MapEvent event)

            {

              System.out.println("change");

              if(event.getType() == MapEvent.MapEventType.MAP_COMMAND){

                CommandManager val = (CommandManager)event.getNewValue();

                Object old=event.getOldValue();

                System.out.println(val.getMaxHistorySize());

              }

            }});

              }

 

 

Thanks in advance for your help, I’m really lost here.

 

 

DESPRES Damien


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

 


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



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



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



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



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



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



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



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



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



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



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



Back to the top