Hi,
I am new to UDIG and RCP. I want to create an RCP
application with a base map. I have configured the base map as a
project and need to open this project when the user clicks on
mapdisplay command in RCP application.
I am using rcp tutorial provided with UDIG as a base
reference. Looking into the example , the map layers can be added
in the createPartControl method of
MapView class.
I got the code for adding layers through project
String PROJECT_ID="D:\\
Resources\\ProjectTemplates\\UDIGExample.udig";
ProjectRegistry projectRegistry =
ProjectPlugin.getPlugin().getProjectRegistry();
Project udigProject = projectRegistry.getProject(PROJECT_ID);
List<IMap> list = udigProject.getElements(IMap.class);
IMap map1 = list.get(0);
List<ILayer> projectLayers = map1.getMapLayers();
map1.sendCommandSync(BasicCommandFactory.getInstance().createAddManyLayers(projectLayers));
and looking into the example , once the map is defined it is added
to mapViewer class through
mapViewer.setMap() method , but this method accepts “net.refractions.udig.project.internal.Map”
object and the object returned by
iterating ProjectRegistry is” net.refractions.udig.project.IMap”.
Once, the map is created, how can it be binded with the
view?
I have got some idea of retrieving map from the project, but how
can that map be displayed in the view?
Thanks & Regards
Nidhi Arora
Thanks & Regards
Nidhi Arora