|
|
|
@ -95,10 +95,8 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
|
|
|
|
|
int attempt = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private LoaderIcon loaderApp = new LoaderIcon("Loading application....");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private HTML attributionDiv = new HTML();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -148,7 +146,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
olMapMng = new OLMapManager(mainPanel.getMapPanel().getElement().getId(),
|
|
|
|
|
layerManager.getLayerManagerBus(), firstBaseLayer);
|
|
|
|
|
OpenLayerMap olMap = olMapMng.getOLMap();
|
|
|
|
|
layerManager.setOlMap(olMap);
|
|
|
|
|
layerManager.setOLMap(olMap);
|
|
|
|
|
mainPanel.setMap(olMap);
|
|
|
|
|
|
|
|
|
|
//mainPanel.setMapAttribution(olMapMng.getOLOSMMap().getMapAttribution());
|
|
|
|
@ -310,9 +308,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
@Override
|
|
|
|
|
public void onLayerRendered(AddedLayerToMapEvent addedLayerToMapEvent) {
|
|
|
|
|
GWT.log("Fired AddedLayerToMapEvent " + addedLayerToMapEvent.getLayerItem() + "layer type: "+addedLayerToMapEvent.getLayerType());
|
|
|
|
|
// GeoportalDataViewerConstants.print("Fired AddedLayerToMapEvent
|
|
|
|
|
// "+addedLayerToMapEvent.getLayerItem());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
attempt = 0;
|
|
|
|
@ -453,11 +449,11 @@ public class GeoportalDataViewer implements EntryPoint {
|
|
|
|
|
String attributionHTML = "<div class='map-credits'><div class='map-credits-container'>"
|
|
|
|
|
+ baseLayer.getAttribution() + "</div></div>";
|
|
|
|
|
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)) {
|
|
|
|
|
|
|
|
|
|
// THE OSM Contributors are automatically added by gwt-ol, others ones not.
|
|
|
|
|
if (!baseLayer.getType().equals(BaseMapLayer.OL_BASE_MAP.OSM)) {
|
|
|
|
|
attributionDiv.setHTML(attributionHTML);
|
|
|
|
|
}else
|
|
|
|
|
} else
|
|
|
|
|
attributionDiv.setHTML("");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|