Geomajas client GWT layer plug-in guide

Geomajas Developers and Geosparc


Table of Contents

1. Introduction
2. SMARTGWT widgets for layers
1. Widget LayerList

Chapter 1. Introduction

Documentation for the Geomajas client GWT layer plugin.

Chapter 2. SMARTGWT widgets for layers

Table of Contents

1. Widget LayerList

1. Widget LayerList

This section is coded in MVP. Use an instance of the the presenter LayerListPresenterImpl with the appropriate MapWidget instance. The view is automaticcaly injected into the presenter via the ViewManager. By default, LayerListView is used as the view class. To make use of a custom view, create a view class from the LayerListPresenter.View, e.g. myCustumView interface and register this view to the ViewManager via the entry point class of this plugin:

((ViewManagerImpl) org.geomajas.widget.layer.client.Layer.getViewFactory()).createLayerListView(myCustumView);

To enable drag/drop functionality, call the method of the presenter: setDragDropEnabled(boolean dragDropEnabled).

LayerListClientWmsPresenterImpl is an extension of LayerListPresenterImpl that can be used for adding client side WMS layers to the map. On this presenter, one can call method addClientWmsLayer(). This will show a wizard for adding a WMS layer based on the GetCapabilities URL of the WMS server. The layerList widget of this presenter is by default provided with an extra column that will show a delete button for an added client side WMS layer. The addition of the delete button row can be prevented by setting a boolean value to the presenter via setShowDeleteButtons(false). Currently, it is not possible to delete added client side WMS layers.

Views of LayerListClientWmsPresenterImpl can be configured:

((ViewManagerImpl) org.geomajas.widget.layer.client.Layer.getViewFactory()).createLayerListWithRemoveButtonView(myCustumLayerListClientWmsView);

//for the general wizard window
((ViewManagerImpl) org.geomajas.widget.layer.client.Layer.getViewFactory()).createControllerButtonsView(myCustumControllerButtonsView);
// for wizard panels:
((ViewManagerImpl) org.geomajas.widget.layer.client.Layer.getViewFactory()).createGetCapabilitiesView(myCustumGetCapabilitiesView);
// ...