"
+ + baseMapLayer.getAttribution() + "
";
+ attributionDiv = new HTML();
+
+ // THE OSM Contributors are automatically added by gwt-ol, others ones not.
+ if (!baseMapLayer.getType().equals(BaseMapLayer.OL_BASE_MAP.OSM)) {
+ attributionDiv.setHTML(attributionHTML);
+ theMapPanel.add(attributionDiv);
+ }
+ }
+
private void setMapSize() {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
- int width = theMap.getParent().getOffsetWidth();
- int height = theMap.getParent().getOffsetHeight();
+ int width = theMapPanel.getParent().getOffsetWidth();
+ int height = theMapPanel.getParent().getOffsetHeight();
if (width == 0)
width = 300;
@@ -96,7 +172,7 @@ public class MapView extends Composite {
height = 300;
GWT.log("Internal Map w: " + width + ", h: " + height);
- theMap.setSize(width + "px", height + "px");
+ theMapPanel.setSize(width + "px", height + "px");
}
});
}
@@ -169,7 +245,7 @@ public class MapView extends Composite {
}
- public LightOpenLayerOSM getLightOLSM() {
+ public LightOpenLayerMap getLightOLSM() {
return lightOLSM;
}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/map/MapView.ui.xml b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/map/MapView.ui.xml
index 27b1dbe..b24e854 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/map/MapView.ui.xml
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/map/MapView.ui.xml
@@ -1,23 +1,17 @@