Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Adding layers from code

Hello,

 

How could I add layers to the map programmatically? Just like the url’s (with parameters) inside I umap file are stored, I want these like of urls to one or more layers from the code to a map. I looked at the code how a project is opened, but I was wondering if this could also be done without using the different Project classes.  

 

So for example I have an url for a WMS server (with layers specified) I want to add these to a map without defining that I am going to add WMS layers (or use the catalog.wms classes). It should be done by the catalog. I found the code inside the UDIG Developers Guide about creating a map from the code, but using a GeoResource adds all the layers from a url (which I don’t).

 

Hopefully somebody can give me a little piece of example code about how to get this working.

 

Best regards,

 

Johan de Koning


Back to the top