Class GeolocItem
java.lang.Object
fr.paris.lutece.plugins.leaflet.business.GeolocItem
A geoloc item with methods to translate to/from geojson and to XML
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeolocItemParses a geojson string to build a GeolocItem Object.Returns the AddressReturns the GeometrygetIcon()Returns the IcondoublegetLat()Returns the LatgetLayer()Returns the LayerdoublegetLon()Returns the LonReturns the LonLatReturns the PropertiesgetType()Returns the TypevoidsetGeometry(Map<String, Object> geometry) Sets the GeometryvoidSets the IconvoidsetProperties(Map<String, Object> properties) Sets the PropertiesvoidsetTypegeometry(String _typegeometry) toJSON()Writes the geojson to a StringtoXML()Writes the xml to a String.
-
Field Details
-
PATH_TYPE
- See Also:
-
PATH_GEOMETRY
- See Also:
-
PATH_GEOMETRY_TYPE
- See Also:
-
PATH_GEOMETRY_COORDINATES
- See Also:
-
PATH_PROPERTIES
- See Also:
-
PATH_PROPERTIES_ADDRESS
- See Also:
-
PATH_PROPERTIES_ICON
- See Also:
-
PATH_PROPERTIES_LAYER
- See Also:
-
XML_ROOT
- See Also:
-
XML_LON
- See Also:
-
XML_LAT
- See Also:
-
XML_ADDRESS
- See Also:
-
XML_ICON
- See Also:
-
XML_LAYER
- See Also:
-
VALUE_TYPE
- See Also:
-
VALUE_GEOMETRY_TYPE
- See Also:
-
VALUE_GEOMETRY_TYPE_POLYGON
- See Also:
-
VALUE_GEOMETRY_TYPE_POLYLINE
- See Also:
-
-
Constructor Details
-
GeolocItem
public GeolocItem()
-
-
Method Details
-
setGeometry
Sets the Geometry- Parameters:
geometry- the geometry
-
setProperties
Sets the Properties- Parameters:
properties- the geometry
-
getType
Returns the Type- Returns:
- The type
-
getProperties
Returns the Properties- Returns:
- The properties
-
getGeometry
Returns the Geometry- Returns:
- The geometry
-
getLonLat
Returns the LonLat- Returns:
- The LonLat
-
getLon
public double getLon()Returns the Lon- Returns:
- The Lon
-
getLat
public double getLat()Returns the Lat- Returns:
- The Lat
-
getAddress
Returns the Address- Returns:
- The address
-
getIcon
Returns the Icon- Returns:
- The icon
-
getLayer
Returns the Layer- Returns:
- The layer
-
setIcon
Sets the Icon- Parameters:
icon- the icon
-
toJSON
Writes the geojson to a String- Returns:
- The geojseon String
-
toXML
Writes the xml to a String. This is a non standard representation.- Returns:
- The xml String
-
fromJSON
Parses a geojson string to build a GeolocItem Object.- Returns:
- The geolocItem object
- Throws:
IOException
-
getTypegeometry
-
setTypegeometry
-