vtm-web-app: include theme with texture atlas symbols #51
This commit is contained in:
parent
fdc793d9ec
commit
f2dda7c8eb
@ -1,4 +1,4 @@
|
|||||||
<atlas img="icons/maki.png">
|
<atlas img="atlas/maki.png">
|
||||||
<rect id="airfield" pos="1 105 24 24" />
|
<rect id="airfield" pos="1 105 24 24" />
|
||||||
<rect id="airport" pos="1 79 24 24" />
|
<rect id="airport" pos="1 79 24 24" />
|
||||||
<rect id="alcohol-shop" pos="27 105 24 24" />
|
<rect id="alcohol-shop" pos="27 105 24 24" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<atlas img="icons/osm.png">
|
<atlas img="atlas/osm.png">
|
||||||
<rect id="airport" pos="1 40 16 16" />
|
<rect id="airport" pos="1 40 16 16" />
|
||||||
<rect id="atm" pos="19 40 16 16" />
|
<rect id="atm" pos="19 40 16 16" />
|
||||||
<rect id="bar" pos="1 80 20 20" />
|
<rect id="bar" pos="1 80 20 20" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<atlas img="icons/osmarender.png">
|
<atlas img="atlas/osmarender.png">
|
||||||
<rect id="airport" pos="226 38 24 24" />
|
<rect id="airport" pos="226 38 24 24" />
|
||||||
<rect id="alpine_hut" pos="198 41 26 21" />
|
<rect id="alpine_hut" pos="198 41 26 21" />
|
||||||
<rect id="atm" pos="279 2 14 16" />
|
<rect id="atm" pos="279 2 14 16" />
|
||||||
|
@ -68,6 +68,12 @@ task copyThemeAssets(type: Copy) {
|
|||||||
include '**/*'
|
include '**/*'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task copyThemeLocalAssets(type: Copy) {
|
||||||
|
from "resources/assets"
|
||||||
|
into "assets"
|
||||||
|
include '**/*'
|
||||||
|
}
|
||||||
|
|
||||||
task copyVtmAssets(type: Copy) {
|
task copyVtmAssets(type: Copy) {
|
||||||
from "$rootDir/vtm/resources/assets"
|
from "$rootDir/vtm/resources/assets"
|
||||||
into "assets"
|
into "assets"
|
||||||
@ -82,6 +88,7 @@ task copyWarSources(type: Copy) {
|
|||||||
|
|
||||||
tasks.withType(JavaCompile) { compileTask ->
|
tasks.withType(JavaCompile) { compileTask ->
|
||||||
compileTask.dependsOn copyThemeAssets
|
compileTask.dependsOn copyThemeAssets
|
||||||
|
compileTask.dependsOn copyThemeLocalAssets
|
||||||
compileTask.dependsOn copyVtmAssets
|
compileTask.dependsOn copyVtmAssets
|
||||||
compileTask.dependsOn copyWarSources
|
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.Gdx;
|
||||||
import com.badlogic.gdx.backends.gwt.GwtApplication;
|
import com.badlogic.gdx.backends.gwt.GwtApplication;
|
||||||
|
|
||||||
|
import org.oscim.backend.AssetAdapter;
|
||||||
import org.oscim.backend.CanvasAdapter;
|
import org.oscim.backend.CanvasAdapter;
|
||||||
import org.oscim.backend.GL;
|
import org.oscim.backend.GL;
|
||||||
import org.oscim.backend.GLAdapter;
|
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.VectorTileLayer;
|
||||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||||
import org.oscim.renderer.MapRenderer;
|
import org.oscim.renderer.MapRenderer;
|
||||||
|
import org.oscim.theme.StreamRenderTheme;
|
||||||
import org.oscim.theme.VtmThemes;
|
import org.oscim.theme.VtmThemes;
|
||||||
import org.oscim.tiling.TileSource;
|
import org.oscim.tiling.TileSource;
|
||||||
import org.oscim.tiling.source.bitmap.BitmapTileSource;
|
import org.oscim.tiling.source.bitmap.BitmapTileSource;
|
||||||
@ -115,7 +117,8 @@ class GwtMap extends GdxMap {
|
|||||||
l = mMap.setBaseMap(ts);
|
l = mMap.setBaseMap(ts);
|
||||||
|
|
||||||
if (themeName == null) {
|
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 {
|
} else {
|
||||||
if ("osmarender".equals(themeName))
|
if ("osmarender".equals(themeName))
|
||||||
mMap.setTheme(VtmThemes.OSMARENDER);
|
mMap.setTheme(VtmThemes.OSMARENDER);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user