Added Layer offset manager
parent
6197d40fae
commit
db9ff853bc
@ -0,0 +1,51 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.gis;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* The Class LayerOrder.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Nov 12, 2021
|
||||
*/
|
||||
public class LayerOrder {
|
||||
|
||||
/**
|
||||
* The Enum LAYER_TYPE.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Nov 12, 2021
|
||||
*/
|
||||
public static enum LAYER_TYPE {
|
||||
BASE_MAP, BASE_WMS, WMS_DETAIL, VECTOR
|
||||
}
|
||||
|
||||
public static final HashMap<LAYER_TYPE, Integer> LAYER_OFFSET = new HashMap<LAYER_TYPE, Integer>(5);
|
||||
|
||||
static {
|
||||
|
||||
LAYER_OFFSET.put(LAYER_TYPE.BASE_MAP, 0);
|
||||
LAYER_OFFSET.put(LAYER_TYPE.BASE_WMS, 70);
|
||||
LAYER_OFFSET.put(LAYER_TYPE.WMS_DETAIL, 140);
|
||||
LAYER_OFFSET.put(LAYER_TYPE.VECTOR, 210);
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new layer order.
|
||||
*/
|
||||
public LayerOrder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the offset.
|
||||
*
|
||||
* @param layerType the layer type
|
||||
* @return the offset
|
||||
*/
|
||||
public Integer getOffset(LAYER_TYPE layerType) {
|
||||
return LAYER_OFFSET.get(layerType);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue