107 lines
2.6 KiB
Java
107 lines
2.6 KiB
Java
package org.gcube.portlets.user.geoportaldataviewer.client;
|
|
|
|
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayersMapParameters;
|
|
|
|
import com.google.gwt.i18n.client.DateTimeFormat;
|
|
|
|
/**
|
|
* The Class GeoportalDataViewerConstants.
|
|
*
|
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
|
*
|
|
* Nov 24, 2020
|
|
*/
|
|
public class GeoportalDataViewerConstants {
|
|
|
|
public static final String MAP_DIV = "map";
|
|
|
|
public static final String GET_WMS_PARAMETER = "wmsrequest";
|
|
public static final String GET_GEONA_ITEM_TYPE = "git";
|
|
public static final String GET_GEONA_ITEM_ID = "gid";
|
|
public static final String GET_UUID_PARAMETER = "uuid";
|
|
public static final String GET_LAYER_TITLE = "layertitle";
|
|
public static final String GET_MAX_ZOOM_LEVEL = OpenLayersMapParameters.OL_MAP_PARAM.maxzoomlevel.name();
|
|
public static final String GET_ZOOM = OpenLayersMapParameters.OL_MAP_PARAM.zoom.name();
|
|
public static final String GET_CENTER_MAP_TO_LONG_LAT = OpenLayersMapParameters.OL_MAP_PARAM.centermap.name();
|
|
|
|
public static enum MapEventType {
|
|
MOUSE_CLICK, MAP_ZOOM_END, MOVE_END, ADDED_CENTROID_LAYER_TO_MAP
|
|
}
|
|
|
|
/**
|
|
* The Enum LayerType.
|
|
*
|
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
|
*
|
|
* Nov 24, 2020
|
|
*/
|
|
public enum LayerType {
|
|
RASTER_BASELAYER, FEATURE_TYPE
|
|
};
|
|
|
|
public static DateTimeFormat DT_FORMAT = DateTimeFormat.getFormat(ConvertToDataViewModel.DATE_FORMAT);
|
|
|
|
public static final int MAX_WFS_FEATURES = 10; // zero for no limit
|
|
|
|
public static final String NEW_LINE_BR = "<br/>";
|
|
|
|
public static enum MAP_PROJECTION {
|
|
|
|
EPSG_4326("4326", "EPSG:4326"), EPSG_3857("3857", "EPSG:3857");
|
|
|
|
String id;
|
|
String name;
|
|
|
|
MAP_PROJECTION(String id, String name) {
|
|
this.id = id;
|
|
this.name = name;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
}
|
|
|
|
public static final double ITALY_CENTER_LONG = 12.45;
|
|
|
|
public static final double ITALY_CENTER_LAT = 42.98;
|
|
|
|
public static final int LIGHT_MAP_ITALY_FIT_ZOOM_ON = 5;
|
|
|
|
public static final int MAP_ITALY_FIT_ZOOM_ON = 5;
|
|
|
|
/**
|
|
* Prints the.
|
|
*
|
|
* @param msg the msg
|
|
*/
|
|
public static native void printJs(String msg)/*-{
|
|
console.log("js console: " + msg);
|
|
}-*/;
|
|
|
|
/**
|
|
* Prints the.
|
|
*
|
|
* @param msg the msg
|
|
*/
|
|
public static native void printJsObj(Object object)/*-{
|
|
console.log("js obj: " + JSON.stringify(object, null, 4));
|
|
}-*/;
|
|
|
|
/**
|
|
* Prints the.
|
|
*
|
|
* @param msg the msg
|
|
*/
|
|
public static native String toJsonObj(Object object)/*-{
|
|
return JSON.stringify(object);
|
|
}-*/;
|
|
|
|
}
|