Switch back to Internal theme to avoid having resources.

This commit is contained in:
Holt59 2018-02-24 13:37:52 +01:00
parent 9db2ee36dd
commit f6fdb1871f
2 changed files with 3 additions and 11 deletions

View File

@ -59,5 +59,6 @@
<attribute name="javadoc_location" value="jar:platform:/resource/be-graphes-base/libs/svg-salamander-1.0-javadoc.jar!/"/> <attribute name="javadoc_location" value="jar:platform:/resource/be-graphes-base/libs/svg-salamander-1.0-javadoc.jar!/"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="libs/mapsforge-themes-0.9.1.jar"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -4,7 +4,6 @@ import java.awt.Color;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelEvent;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -40,8 +39,7 @@ import org.mapsforge.map.model.DisplayModel;
import org.mapsforge.map.model.MapViewPosition; import org.mapsforge.map.model.MapViewPosition;
import org.mapsforge.map.model.Model; import org.mapsforge.map.model.Model;
import org.mapsforge.map.reader.MapFile; import org.mapsforge.map.reader.MapFile;
import org.mapsforge.map.rendertheme.ExternalRenderTheme; import org.mapsforge.map.rendertheme.InternalRenderTheme;
import org.mapsforge.map.rendertheme.XmlRenderTheme;
public class MapViewDrawing extends MapView implements Drawing { public class MapViewDrawing extends MapView implements Drawing {
@ -192,14 +190,7 @@ public class MapViewDrawing extends MapView implements Drawing {
return true; return true;
} }
}; };
XmlRenderTheme renderTheme = null; tileRendererLayer.setXmlRenderTheme(InternalRenderTheme.DEFAULT);
try {
renderTheme = new ExternalRenderTheme("resources/assets/custom-theme.xml");
}
catch (FileNotFoundException e) {
e.printStackTrace();
}
tileRendererLayer.setXmlRenderTheme(renderTheme);
return tileRendererLayer; return tileRendererLayer;
} }