|
|
|
@ -30,7 +30,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.events.ZoomOutOverMini
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.events.ZoomOutOverMinimumEventHandler;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.ExtentWrapped;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.MapUtils;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerOSM;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerMap;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.ui.GeonaDataViewMainPanel;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.util.URLUtil;
|
|
|
|
@ -66,7 +66,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
public final static String APP_DIV = "geoportal-data-viewer";
|
|
|
|
|
|
|
|
|
|
/** The ol map. */
|
|
|
|
|
// private OpenLayerOSM olMap = null;
|
|
|
|
|
// private OpenLayerMap olMap = null;
|
|
|
|
|
|
|
|
|
|
/** The main panel. */
|
|
|
|
|
private GeonaDataViewMainPanel mainPanel;
|
|
|
|
@ -139,6 +139,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(List<BaseMapLayer> listBaseMapLayers) {
|
|
|
|
|
RootPanel.get(APP_DIV).remove(loaderApp);
|
|
|
|
|
//now the map is loaded and I'm sure that I can load the GeonaDataViewer Profile
|
|
|
|
|
loadGeonaDataViewerProfile();
|
|
|
|
|
mainPanel.setBaseLayers(listBaseMapLayers);
|
|
|
|
|
|
|
|
|
@ -146,8 +147,9 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
//Passing the first base map layer that will be applied as first base layer
|
|
|
|
|
olMapMng = new OLMapManager(mainPanel.getMapPanel().getElement().getId(),
|
|
|
|
|
layerManager.getLayerManagerBus(), firstBaseLayer);
|
|
|
|
|
layerManager.setOlMap(olMapMng.getOLOSMMap());
|
|
|
|
|
mainPanel.setMap(olMapMng.getOLOSMMap());
|
|
|
|
|
OpenLayerMap olMap = olMapMng.getOLMap();
|
|
|
|
|
layerManager.setOlMap(olMap);
|
|
|
|
|
mainPanel.setMap(olMap);
|
|
|
|
|
|
|
|
|
|
//mainPanel.setMapAttribution(olMapMng.getOLOSMMap().getMapAttribution());
|
|
|
|
|
updateSize();
|
|
|
|
@ -407,7 +409,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
DO_LAYER_ACTION doAction = doLayerActionEvent.getDoAction();
|
|
|
|
|
GWT.log("event: "+doAction);
|
|
|
|
|
GWT.log("layer source: "+doLayerActionEvent.getLayerItem().getName());
|
|
|
|
|
OpenLayerOSM olMap = olMapMng.getOLOSMMap();
|
|
|
|
|
OpenLayerMap olMap = olMapMng.getOLMap();
|
|
|
|
|
|
|
|
|
|
switch (doAction) {
|
|
|
|
|
case OPACITY:
|
|
|
|
@ -450,7 +452,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
|
|
|
|
|
String attributionHTML = "<div class='map-credits'><div class='map-credits-container'>"
|
|
|
|
|
+ baseLayer.getAttribution() + "</div></div>";
|
|
|
|
|
olMapMng.getOLOSMMap().changeBaseMap(baseLayer);
|
|
|
|
|
olMapMng.getOLMap().changeBaseMap(baseLayer);
|
|
|
|
|
|
|
|
|
|
//THE OSM Contributors are automatically added by gwt-ol, other ones not.
|
|
|
|
|
if(!baseLayer.getType().equals(BaseMapLayer.OL_BASE_MAP.OSM)) {
|
|
|
|
|