your table assigned a datasource , datasource assigned to a Layer , layer assigned to a map , map assigned to MapView . MapView has a RenderManager, and renders Layers of a Map to screen. So if you want to display smith on screen you must create a datasource. If you don't want to connect mysql directly ( that s i understand) gather your parameters that describes which features ll be shown , create features in stratch datasource , or object datasource using geotools and display it .
If you want to display your features when you selected to a view ( Your Data Table) use WorkbenchSeletionListener . whenever your table selected by user new AddLayerCommand(yourlayer).run(..) whenever deselected new RemoveLayerCommand(yourlayer).run(...) i hope this helps you. On May 8, 2012, at 3:24 PM, <[email protected]> wrote: > Excuse I don't understand! My question is: What's the code that renders the > table of mySql in Udig? > > ----Messaggio originale---- > Da: [email protected] > Data: 8-mag-2012 14.01 > A: <[email protected]> > Cc: "User-friendly Desktop Internet GIS"<[email protected]> > Ogg: Re: [udig-devel] How to get vector data in udig > > uDig TableView works by: > > 1) Watching the workbench selection for the next "selected" Layer > 2) Layer -> GeoResource > 3) GeoResource.canResolve( SimpleFeatureStore.class ) = true; and then > GeoResource.resolve( SimpleFeatureStore.class, progress) --> > SimpleFeatureStore > 4) SimpleFeatureStore.features( Query ) --> SimpleFeatureCollection > > The SimpleFeatureCollection is what is displayed… > > -- > Jody Garnett > > On Tuesday, 8 May 2012 at 9:24 PM, [email protected] wrote: > >> >> I must do another catalog as MySql, but with the differrence that i haven't >> need of connection!but I want that when I click on name of my catalog opens >> a wizard that contains the workflow of my tool graphic and the table!When I >> choose a table, I want to display it in udig!So, I want know how Udig >> renders the table of mySql! >> Can you help me? >> ----Messaggio originale---- >> Da: [email protected] >> Data: 6-mag-2012 15.30 >> A: <[email protected]>, "User-friendly Desktop Internet >> GIS"<[email protected]> >> Ogg: Re: [udig-devel] How to get vector data in udig >> >> There should be examples of how to add your database to the uDig catalog. >> - http://udig.refractions.net/confluence/display/DEV/2+Catalog >> >> The example for PostGIS as as follows: >> Map<String,Serializable> params = new HashMap<String,Serializable>(); >> params.put("dbtype", "postgis"); // must be "postgis" >> params.put("host", "www.refractions.net"); // the name or ip address of the >> machine running PostGIS >> params.put("port", new Integer(5432)); // the port that PostGIS is >> running on (generally 5432) >> params.put("database", "demo-bc"); // the name of the database to >> connect to. >> params.put("user", "demo"); // the user to connect with >> params.put("passwd", "demo"); >> >> IRepository local = CatalogPlugin.getDefault().getLocal(); >> IService service = local.acquire( params, new NullProgressMonitor() ); >> Or you may wish to try using the GeoTools classes directly? Notice this page >> also has the connection parameters to use with the uDig catalog above. >> - http://docs.geotools.org/latest/userguide/library/jdbc/mysql.html >> >> -- >> Jody Garnett >> >> On Friday, 4 May 2012 at 9:10 PM, [email protected] wrote: >> >>> Hi! >>> After i have choose mySql database and table, what is the block of code (in >>> java) that gets the geographical information(vector data)? >>> Thanks to much! >>> _______________________________________________ >>> 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
