* @param em the current ExtensionManager
* @param gdm the GeoDataModel where the serviceList for the SwitchMapButton is taken from
*/
protected void loadInternalPlugins(ExtensionManager em, GeoDataModel gdm, Configuration conf) {
// load data model
ServiceList serviceList = null;
try {
ServerList serverList = gdm.loadServerList("http://www.earth3d.org/earth3daddresses.xml");
serviceList = gdm.loadServiceList(serverList.getAddresses().get(1));
} catch (MalformedURLException e) {
e.printStackTrace();
}
// add controller
TreeViewServicesManager tvsm = new TreeViewServicesManager();
tvsm.setConfiguration(conf);
tvsm.setExtensionManager(em);
tvsm.init();
// load first geometry into model
String value = conf.getProperty("mapnumber");
int serviceIndex = 0;
if (value != null) {
serviceIndex = Integer.parseInt(value);
}
gdm.loadGeometry(gdm.loadService(serviceList.getServices().get(serviceIndex++)).getGeometry());
// load main window
createMainWindow(gdm, em, conf);
// load info windows