Update vtm-web modules (#240) #51

This commit is contained in:
Izumi Kawashima
2016-11-20 17:37:01 +09:00
committed by Emux
parent bfa5a095f0
commit 308497ffa6
16 changed files with 1410 additions and 752 deletions

View File

@@ -5,7 +5,7 @@ buildscript {
maven { url 'http://dl.bintray.com/steffenschaefer/maven' }
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.5'
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
}
}
@@ -38,7 +38,7 @@ evaluationDependsOn(':vtm-gdx')
evaluationDependsOn(':vtm-web')
gwt {
gwtVersion = '2.6.1'
gwtVersion = project.ext.gwtVersion
modules 'org.oscim.web.VtmWebApp'
superDev {

View File

@@ -6,8 +6,6 @@
<set-property name='gwt.logging.enabled' value='TRUE' />
<set-property name='gwt.logging.consoleHandler' value='ENABLED' />
<set-property name='gwt.logging.firebugHandler' value='DISABLED' />
<set-property name='gwt.logging.popupHandler' value='DISABLED' />
<set-property name="gwt.logging.logLevel" value="FINE" />
<!-- super dev mode -->
@@ -23,4 +21,5 @@
<set-configuration-property name="gdx.assetoutputpath" value="build/gwt/draftOut" />
<set-property name="user.agent" value="safari" />
</module>

View File

@@ -27,6 +27,8 @@ import org.oscim.gdx.client.MapConfig;
public class GwtLauncher extends GwtApplication {
private ApplicationListener applicationListener;
@Override
public GwtApplicationConfiguration getConfig() {
@@ -36,7 +38,6 @@ public class GwtLauncher extends GwtApplication {
cfg.canvasId = "map-canvas";
cfg.stencil = true;
cfg.fps = 120;
return cfg;
}
@@ -45,6 +46,14 @@ public class GwtLauncher extends GwtApplication {
public ApplicationListener getApplicationListener() {
Tile.SIZE = MapConfig.get().getTileSize();
if (applicationListener == null) {
applicationListener = createApplicationListener();
}
return applicationListener;
}
@Override
public ApplicationListener createApplicationListener() {
return new GwtMap();
}

View File

@@ -1,5 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016 Izumi Kawashima
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -63,6 +64,7 @@ class GwtMap extends GdxMap {
GdxAssets.init("");
CanvasAdapter.textScale = 0.7f;
log.debug("GLAdapter.init");
GLAdapter.init((GL) Gdx.graphics.getGL20());
GLAdapter.GDX_WEBGL_QUIRKS = true;
MapRenderer.setBackgroundColor(0xffffff);
@@ -92,12 +94,18 @@ class GwtMap extends GdxMap {
ts = DefaultSources.STAMEN_TONER.build();
else if ("osm".equals(mapName))
ts = DefaultSources.OPENSTREETMAP.build();
else if ("osm-transport".equals(mapName))
ts = DefaultSources.OSM_TRANSPORT.build();
else if ("watercolor".equals(mapName))
ts = DefaultSources.STAMEN_WATERCOLOR.build();
else if ("arcgis-shaded".equals(mapName))
ts = DefaultSources.ARCGIS_RELIEF.build();
else if ("imagico".equals(mapName))
ts = DefaultSources.IMAGICO_LANDCOVER.build();
else if ("ne-landcover".equals(mapName))
ts = DefaultSources.NE_LANDCOVER.build();
else if ("hikebike".equals(mapName))
ts = DefaultSources.HIKEBIKE.build();
else if ("hikebike-hillshade".equals(mapName))
ts = DefaultSources.HIKEBIKE_HILLSHADE.build();
else
ts = DefaultSources.STAMEN_TONER.build();