APIs
Log In
APIs

Constant class

Constant is a class available in the JavaScript library that provides some useful constants that you can reuse in your own code.

Below are the constants made available through this class :

Constant.API_ROOT = "https://youmaps-eu.appspot.com/_ah/api";

Constant.TILEMANAGER_API_NAME = "tilemanager";
Constant.TILEMANAGER_API_VERSION = "v1.0";

Constant.MARKERLAYERMANAGER_API_NAME = "markerLayerManager";
Constant.MARKERLAYERMANAGER_API_VERSION = "v1.0";

Constant.YOUMAPS_API_NAME = "youmaps";
Constant.YOUMAPS_API_VERSION = "v2.0";

/** Mapdata Layer statuses **/
Constant.UPLOAD_DONE = "upload_done";
Constant.CONVERSION_PENDING = "conversion_pending";
Constant.CONVERSION_DONE    = "conversion_done";
Constant.CONVERSION_ERROR   = "conversion_error";
Constant.EXPORT_PENDING     = "export_pending";
Constant.EXPORT_DONE        = "export_done";
Constant.EXPORT_ERROR       = "export_error";
Constant.CONVERSION_ERROR   = "geocoding_error";

/** Supported Geometry Types **/
Constant.GEOMETRY_TYPES = {
	POINT    : "POINT",
	POLYLINE : "LINESTRING",
	POLYGON  : "POLYGON",
	RASTER   : "RASTER"
};

/** Internal license key **/
Constant.INTERNAL_LICENSE_KEY_TYPE = "internal";
/** External license key **/
Constant.EXTERNAL_LICENSE_KEY_TYPE = "external";

/** Styles modes **/
Constant.GLOBAL_STYLE = "global";
Constant.BY_ATTRIBUTE_STYLE = "byAttribute";
Constant.THEMATIC_STYLE = "thematic";
Constant.BUBBLES_STYLE = "bubbles";

/** Some of the available REST API methods (sorted A->Z) **/
Constant.API_LINKS = {
	addFolderToMapboard             	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addFolderToMapboard",	
	addMapboard             			: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addMapboard",		
	addPointByAddress               	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addPointByAddress",
	addPointByLatLong               	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addPointByLatLong",
	addPolygon                      	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addPolygon",
	addPolyline                     	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addPolyline",
	addStyle                     		: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addStyle",
	addTemplateMapdata					: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/addTemplateMapdata",
	applyThematic						: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/applyThematic",
	deleteFolder                    	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/deleteFolder",
	deleteMapboard                  	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/deleteMapboard",
	deleteMapdata                   	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/deleteMapdata",
	deleteMapdatas                  	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/deleteMapdatas",
	deleteGeometry                  	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/deleteGeometry",
	getAttributeFilters					: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getAttributeFilters",
	getFilteredGeometriesByCircleRadius	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getFilteredGeometriesByCircleRadius",
	getFilteredGeometriesByPolygon		: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getFilteredGeometriesByPolygon",
	getGeometryAttributes           	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getGeometryAttributes",
	getGeometriesContainingPoint		: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getGeometriesContainingPoint",
	getFilteredGeometriesByAttribute	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getFilteredGeometriesByAttribute",
	getFullDataFileURLs             	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getFullDataFileURLs",
	getMapboard                     	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getMapboard",
	getMapboardFolderList           	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getMapboardFolderList",
	getMapboardMapdataList          	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getMapboardMapdataList",
	getMapdata                      	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getMapdata",
	getMapdataAttributes				: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getMapdataAttributes",
	getNearestGeometries				: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getNearestGeometries",
	getPolygons                     	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getPolygons",
	getPolygonsContainingPoint      	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getPolygonsContainingPoint",
	getSharedMapboards        			: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getSharedMapboards",
	getSpatialFilters					: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getSpatialFilters",
	getVerticesFilesURLs           	 	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getVerticesFilesURLs",
	getThematicMapFileURLs          	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/getThematicMapFileURLs",
	initYoumapsJSLibrary            	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/initYoumapsJSLibrary",
	setElementOrder						: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setElementOrder",
	setFolderName                   	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setFolderName",			
	setGeometryAttribute            	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setGeometryAttribute",
	setGeometryAttributes           	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setGeometryAttributes",
	setGeometryVertices             	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setGeometryVertices",
	setMapboardInTrash              	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapboardInTrash",
	setMapboardName                 	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapboardName",
	setMapdata                 			: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdata",
	setMapdataClustering            	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdataClustering",
	setMapdataColor                 	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdataColor",
	setMapdataFolder                	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdataFolder",
	setMapdataName                  	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdataName",
	setMapdatasOrder                	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdatasOrder",
	setMapdataStyle                 	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setMapdataStyle",
	setPointCoordinates             	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setPointCoordinates",
	setThematicURLs                 	: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/setThematicURLs",
	updateLastModificationDate			: Constant.API_ROOT + "/" + Constant.YOUMAPS_API_NAME + "/" + Constant.YOUMAPS_API_VERSION + "/updateLastModificationDate",
};