package org.simantics.district.maps.server.prefs;
-import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.osgi.service.prefs.Preferences;
-//import org.simantics.maps.server.ui.Activator;
import org.simantics.district.maps.server.Activator;
public class MapsServerPreferences {
public static final String P_START_AUTOMATICALLY = "org.simantics.maps.server.startAutomatically";
public static final String P_DEFAULT_PORT = "org.simantics.maps.server.defaultPort";
+
+ public static final String P_CURRENT_MBTILES = "org.simantics.maps.server.currentMbTiles";
+
+ public static final String P_CURRENT_TM2STYLE = "org.simantics.maps.server.currentTM2Style";
public static Preferences getPreferences() {
- return DefaultScope.INSTANCE.getNode(MapsServerPreferences.P_NODE);
+ return InstanceScope.INSTANCE.getNode(MapsServerPreferences.P_NODE);
}
public static boolean startAutomatically() {
}
public static int defaultPort() {
- return getPreferences().getInt(P_DEFAULT_PORT, 8080);
+ return getPreferences().getInt(P_DEFAULT_PORT, 8585);
+ }
+
+ public static String currentMBTiles() {
+ return getPreferences().get(P_CURRENT_MBTILES, "helsinki_finland.mbtiles");
+ }
+
+ public static String currentTM2Style() {
+ return getPreferences().get(P_CURRENT_TM2STYLE, "mapbox-studio-osm-bright.tm2");
}
}