vtm-web-app: include theme with texture atlas symbols #51
This commit is contained in:
@@ -68,6 +68,12 @@ task copyThemeAssets(type: Copy) {
|
||||
include '**/*'
|
||||
}
|
||||
|
||||
task copyThemeLocalAssets(type: Copy) {
|
||||
from "resources/assets"
|
||||
into "assets"
|
||||
include '**/*'
|
||||
}
|
||||
|
||||
task copyVtmAssets(type: Copy) {
|
||||
from "$rootDir/vtm/resources/assets"
|
||||
into "assets"
|
||||
@@ -82,6 +88,7 @@ task copyWarSources(type: Copy) {
|
||||
|
||||
tasks.withType(JavaCompile) { compileTask ->
|
||||
compileTask.dependsOn copyThemeAssets
|
||||
compileTask.dependsOn copyThemeLocalAssets
|
||||
compileTask.dependsOn copyVtmAssets
|
||||
compileTask.dependsOn copyWarSources
|
||||
}
|
||||
|
||||
BIN
vtm-web-app/resources/assets/atlas/osm.png
Normal file
BIN
vtm-web-app/resources/assets/atlas/osm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
1250
vtm-web-app/resources/assets/vtm/default_atlas.xml
Normal file
1250
vtm-web-app/resources/assets/vtm/default_atlas.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,7 @@ package org.oscim.web.client;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.backends.gwt.GwtApplication;
|
||||
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.GL;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
@@ -36,6 +37,7 @@ import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||
import org.oscim.renderer.MapRenderer;
|
||||
import org.oscim.theme.StreamRenderTheme;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.tiling.TileSource;
|
||||
import org.oscim.tiling.source.bitmap.BitmapTileSource;
|
||||
@@ -115,7 +117,8 @@ class GwtMap extends GdxMap {
|
||||
l = mMap.setBaseMap(ts);
|
||||
|
||||
if (themeName == null) {
|
||||
mMap.setTheme(VtmThemes.DEFAULT);
|
||||
// Local theme with texture atlas using png
|
||||
mMap.setTheme(new StreamRenderTheme("", AssetAdapter.readFileAsStream("vtm/default_atlas.xml")));
|
||||
} else {
|
||||
if ("osmarender".equals(themeName))
|
||||
mMap.setTheme(VtmThemes.OSMARENDER);
|
||||
|
||||
Reference in New Issue
Block a user