From eee59a55b1b2973ad0a2359b2cdffd7d4e09fc7a Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Wed, 11 Mar 2015 09:25:48 +0000 Subject: [PATCH] test to integrate Open Street Map git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer-app@113556 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 1 - .settings/org.eclipse.wst.common.component | 5 +---- .../gisviewerapp/client/GisViewerApp.java | 20 +++++++++++++++++++ src/main/webapp/GisViewerApp.html | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.classpath b/.classpath index 469e4a7..573f832 100644 --- a/.classpath +++ b/.classpath @@ -14,7 +14,6 @@ - diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index ec2933e..a11eb3f 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -3,10 +3,7 @@ - - uses - - + uses diff --git a/src/main/java/org/gcube/portlets/user/gisviewerapp/client/GisViewerApp.java b/src/main/java/org/gcube/portlets/user/gisviewerapp/client/GisViewerApp.java index 7deebce..66c0009 100644 --- a/src/main/java/org/gcube/portlets/user/gisviewerapp/client/GisViewerApp.java +++ b/src/main/java/org/gcube/portlets/user/gisviewerapp/client/GisViewerApp.java @@ -32,6 +32,26 @@ public class GisViewerApp implements EntryPoint { updateSize(); + /* + OSMOptions options = new OSMOptions(); + options.setNumZoomLevels(Constants.numZoomLevels); + options.setProjection(Constants.defaultProjection); + options.crossOriginFix(); + + MapWidget mapWdg = appController.getGisViewerPanel().getOpenLayersMap().getMapWidget(); + OSM osm1 = new OSM("OSM Cycle","http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", options); + osm1.setIsBaseLayer(true); + mapWdg.getMap().addLayer(osm1); + + OSM osm2 = new OSM("OSM Default","http://a.tile.openstreetmap.org/${z}/${x}/${y}.png", options); + osm2.setIsBaseLayer(true); + mapWdg.getMap().addLayer(osm2); + + OSM osm3 = new OSM("OSM Humaritarian","http://b.tile.openstreetmap.fr/hot/${z}/${x}/${y}.png", options); + osm3.setIsBaseLayer(true); + mapWdg.getMap().addLayer(osm3); + */ + appController.getGisViewerPanel().showIntro(); } diff --git a/src/main/webapp/GisViewerApp.html b/src/main/webapp/GisViewerApp.html index 0d9b244..6644878 100644 --- a/src/main/webapp/GisViewerApp.html +++ b/src/main/webapp/GisViewerApp.html @@ -14,6 +14,7 @@ +