From e3dccea307f96109ef45e220e6b0984bb81ddff6 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Fri, 26 Jul 2013 00:59:45 +0200 Subject: [PATCH] html: set start position in mapconfig --- vtm-gdx-html/src/org/oscim/gdx/client/GwtLauncher.java | 10 ++++++++++ vtm-gdx-html/war/index.html | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/vtm-gdx-html/src/org/oscim/gdx/client/GwtLauncher.java b/vtm-gdx-html/src/org/oscim/gdx/client/GwtLauncher.java index 465c5372..d1d0576b 100644 --- a/vtm-gdx-html/src/org/oscim/gdx/client/GwtLauncher.java +++ b/vtm-gdx-html/src/org/oscim/gdx/client/GwtLauncher.java @@ -4,6 +4,7 @@ package org.oscim.gdx.client; import org.oscim.backend.CanvasAdapter; import org.oscim.backend.GL20; import org.oscim.backend.GLAdapter; +import org.oscim.core.MapPosition; import org.oscim.core.Tile; import org.oscim.gdx.GdxMap; import org.oscim.tilesource.TileSource; @@ -68,6 +69,15 @@ public class GwtLauncher extends GwtApplication { //Gdx.app.setLogLevel(Application.LOG_DEBUG); super.create(); + + double lat = Double.parseDouble(getMapConfig("latitude")); + double lon = Double.parseDouble(getMapConfig("longitude")); + int zoom = Integer.parseInt(getMapConfig("zoom")); + + MapPosition p = new MapPosition(); + p.setZoomLevel(zoom); + p.setPosition(lat, lon); + mMapView.setMapPosition(p); } } } diff --git a/vtm-gdx-html/war/index.html b/vtm-gdx-html/war/index.html index 6e64eea0..7078b449 100644 --- a/vtm-gdx-html/war/index.html +++ b/vtm-gdx-html/war/index.html @@ -24,8 +24,11 @@ canvas { @@ -46,7 +49,7 @@ canvas { function handleMouseDown(evt) { evt.preventDefault(); evt.stopPropagation(); - evt.target.style.cursor = 'move'; + evt.target.style.cursor = 'default'; } function handleMouseUp(evt) {