diff --git a/vtm-themes/icons/atlas/maki.xml b/vtm-themes/icons/atlas/maki.xml index c0b618d3..1e160e95 100644 --- a/vtm-themes/icons/atlas/maki.xml +++ b/vtm-themes/icons/atlas/maki.xml @@ -1,4 +1,4 @@ - + diff --git a/vtm-themes/icons/atlas/osm.xml b/vtm-themes/icons/atlas/osm.xml index 9f768a2b..dd97b45c 100644 --- a/vtm-themes/icons/atlas/osm.xml +++ b/vtm-themes/icons/atlas/osm.xml @@ -1,4 +1,4 @@ - + diff --git a/vtm-themes/icons/atlas/osmarender.xml b/vtm-themes/icons/atlas/osmarender.xml index 07e3e8f3..b22de45e 100644 --- a/vtm-themes/icons/atlas/osmarender.xml +++ b/vtm-themes/icons/atlas/osmarender.xml @@ -1,4 +1,4 @@ - + diff --git a/vtm-web-app/build.gradle b/vtm-web-app/build.gradle index deb41bea..8001bdb7 100644 --- a/vtm-web-app/build.gradle +++ b/vtm-web-app/build.gradle @@ -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 } diff --git a/vtm-web-app/resources/assets/atlas/osm.png b/vtm-web-app/resources/assets/atlas/osm.png new file mode 100644 index 00000000..463bb5c9 Binary files /dev/null and b/vtm-web-app/resources/assets/atlas/osm.png differ diff --git a/vtm-web-app/resources/assets/vtm/default_atlas.xml b/vtm-web-app/resources/assets/vtm/default_atlas.xml new file mode 100644 index 00000000..9804cf3c --- /dev/null +++ b/vtm-web-app/resources/assets/vtm/default_atlas.xml @@ -0,0 +1,1250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vtm-web-app/src/org/oscim/web/client/GwtMap.java b/vtm-web-app/src/org/oscim/web/client/GwtMap.java index 837d2584..6457b375 100644 --- a/vtm-web-app/src/org/oscim/web/client/GwtMap.java +++ b/vtm-web-app/src/org/oscim/web/client/GwtMap.java @@ -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);