geoportal-data-viewer-app/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerConstant...

107 lines
2.6 KiB
Java
Raw Normal View History

2020-10-23 18:18:06 +02:00
package org.gcube.portlets.user.geoportaldataviewer.client;
2021-08-04 16:10:11 +02:00
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
2020-10-27 16:04:34 +01:00
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayersMapParameters;
2021-08-04 16:10:11 +02:00
import com.google.gwt.i18n.client.DateTimeFormat;
2020-11-24 12:26:38 +01:00
/**
* The Class GeoportalDataViewerConstants.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
2021-09-01 12:51:06 +02:00
* Nov 24, 2020
2020-11-24 12:26:38 +01:00
*/
2020-10-23 18:18:06 +02:00
public class GeoportalDataViewerConstants {
public static final String MAP_DIV = "map";
2021-09-01 12:51:06 +02:00
2020-10-27 16:04:34 +01:00
public static final String GET_WMS_PARAMETER = "wmsrequest";
2020-11-19 15:19:27 +01:00
public static final String GET_GEONA_ITEM_TYPE = "git";
public static final String GET_GEONA_ITEM_ID = "gid";
2020-10-27 16:04:34 +01:00
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();
2021-09-01 12:51:06 +02:00
public static enum MapEventType {
2021-09-08 17:13:59 +02:00
MOUSE_CLICK, MAP_ZOOM_END, MOVE_END, ADDED_CENTROID_LAYER_TO_MAP
2021-09-01 12:51:06 +02:00
}
2020-11-24 12:26:38 +01:00
/**
* The Enum LayerType.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
2021-09-01 12:51:06 +02:00
* Nov 24, 2020
2020-11-24 12:26:38 +01:00
*/
2021-09-01 12:51:06 +02:00
public enum LayerType {
RASTER_BASELAYER, FEATURE_TYPE
};
public static DateTimeFormat DT_FORMAT = DateTimeFormat.getFormat(ConvertToDataViewModel.DATE_FORMAT);
2021-09-09 15:55:33 +02:00
public static final int MAX_WFS_FEATURES = 10; // zero for no limit
2021-09-01 12:51:06 +02:00
2020-11-19 15:19:27 +01:00
public static final String NEW_LINE_BR = "<br/>";
2021-09-01 12:51:06 +02:00
public static enum MAP_PROJECTION {
EPSG_4326("4326", "EPSG:4326"), EPSG_3857("3857", "EPSG:3857");
2021-09-01 12:51:06 +02:00
String id;
2021-09-01 12:51:06 +02:00
String name;
MAP_PROJECTION(String id, String name) {
this.id = id;
2021-09-01 12:51:06 +02:00
this.name = name;
}
public String getId() {
return id;
}
2021-09-01 12:51:06 +02:00
public String getName() {
return name;
}
}
2020-11-19 15:19:27 +01:00
public static final double ITALY_CENTER_LONG = 12.45;
2021-09-01 12:51:06 +02:00
2020-11-19 15:19:27 +01:00
public static final double ITALY_CENTER_LAT = 42.98;
2021-09-01 12:51:06 +02:00
public static final int LIGHT_MAP_ITALY_FIT_ZOOM_ON = 5;
2021-09-01 12:51:06 +02:00
2021-09-07 17:29:56 +02:00
public static final int MAP_ITALY_FIT_ZOOM_ON = 5;
2020-11-24 12:26:38 +01:00
/**
* Prints the.
*
* @param msg the msg
*/
public static native void printJs(String msg)/*-{
2021-09-01 12:51:06 +02:00
console.log("js console: " + msg);
}-*/;
2021-09-02 18:15:15 +02:00
/**
* Prints the.
*
* @param msg the msg
*/
public static native void printJsObj(Object object)/*-{
console.log("js obj: " + JSON.stringify(object, null, 4));
2021-09-02 18:15:15 +02:00
}-*/;
2021-09-02 18:15:15 +02:00
/**
* Prints the.
*
* @param msg the msg
*/
public static native String toJsonObj(Object object)/*-{
return JSON.stringify(object);
}-*/;
2020-10-23 18:18:06 +02:00
}