Hi Jody Thank you so much for your excelent reply. Here is my workflow
1-> I have to select a "toolgate" tool, use it to draw a gate, It can be any shape. Note- I need to select the points like(1,2,3,4) once i clicked 4 the one it has to connect the 4 coordinates,Othere wise I can draw somthing with lines (I prefer first one). 2-> I must write the toolgates outside the roads,If the road size is 10m then , I should not allow the users to draw toolgate with 8m. It should always to be >10.for that I need to extract the coardinates and need to do some calculations before drawing the gate. 3->Once I draw everything then I need to save ( tollgates) it in the SQLServer Database. 4-> Once I open the Map from the database then all gates has to popup automatically on to the screen, and also if I do any changes on that then it needs to save on database again. 5-> The coardiantes may differ , I mean some times i may need to connect 6 coardiantes to draw a gate.. This is my basic workflow, Any Ideas? Any way Thanks again for your answers. Best Regards Babu On Thu, Feb 26, 2009 at 12:46 PM, Jody Garnett <[email protected]>wrote: > On Thu, Feb 26, 2009 at 1:17 PM, prasad babu <[email protected]>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 <[email protected]>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 <[email protected]>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 :* [email protected] [mailto: >>>> [email protected]] *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 < >>>> [email protected]> 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
