Package org.opencms.widgets
Class CmsLocationPickerWidgetValue
java.lang.Object
org.opencms.widgets.CmsLocationPickerWidgetValue
A value of the google map widget.
This is the parsed value of an element of the type String
using the widget GoogleMapWidget
.
lat:50.953412,lng:6.956534,zoom:13,width:400,height:300,mode:dynamic,type:hybrid
Available options are:
lat:50.953412
: the latitudelng:6.956534
: the longitudezoom:7
: initial zoom levelwidth:300
: map width in pixels or %height:200
: map height in pixels or %mode:'static'
: the front-end map's mode should be dynamic or statictype:'hybrid'
: the map type, which can be normal, hybrid, satellite and physical
- Since:
- 7.0.5
- Version:
- $Revision: 1.1 $
- Author:
- Michael Moossen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration class for defining the map mode.static enum
Enumeration class for defining the map types. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default map height in pixels.static final float
The default latitude.static final float
The default longitude.static final CmsLocationPickerWidgetValue.MapMode
The default map mode.static final CmsLocationPickerWidgetValue.MapType
The default map type.static final int
The default map width in pixels.static final int
The default zoom level.static final String
Option height.static final String
Option lat.static final String
Option lng.static final String
Option mode.static final String
Option type.static final String
Option width.static final String
Option zoom. -
Constructor Summary
ConstructorDescriptionCreates a new empty widget option object.Creates a new widget value object, configured by the given value String. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height.float
getLat()
Returns the lat.float
getLng()
Returns the longitude.getMode()
Returns the mode.getType()
Returns the type.int
getWidth()
Returns the width.int
getZoom()
Returns the zoom.protected void
parseOptions
(String configuration) Parses the given configuration String.void
setHeight
(int height) Sets the height.void
setLat
(float lat) Sets the latitude.void
setLng
(float lng) Sets the longitude.void
Sets the mode.void
Sets the type.void
setWidth
(int width) Sets the width.void
setWrappedValue
(String value) Sets the value that is wrapped.void
setZoom
(int zoom) Sets the zoom.toString()
-
Field Details
-
DEFAULT_HEIGHT
The default map height in pixels.- See Also:
-
DEFAULT_LAT
The default latitude.- See Also:
-
DEFAULT_LNG
The default longitude.- See Also:
-
DEFAULT_MODE
The default map mode. -
DEFAULT_TYPE
The default map type. -
DEFAULT_WIDTH
The default map width in pixels.- See Also:
-
DEFAULT_ZOOM
The default zoom level.- See Also:
-
OPTION_HEIGHT
Option height.- See Also:
-
OPTION_LAT
Option lat.- See Also:
-
OPTION_LNG
Option lng.- See Also:
-
OPTION_MODE
Option mode.- See Also:
-
OPTION_TYPE
Option type.- See Also:
-
OPTION_WIDTH
Option width.- See Also:
-
OPTION_ZOOM
Option zoom.- See Also:
-
-
Constructor Details
-
CmsLocationPickerWidgetValue
public CmsLocationPickerWidgetValue()Creates a new empty widget option object. -
CmsLocationPickerWidgetValue
Creates a new widget value object, configured by the given value String.- Parameters:
value
- the value String to parse
-
-
Method Details
-
getHeight
Returns the height.- Returns:
- the height
-
getLat
Returns the lat.- Returns:
- the lat
-
getLng
Returns the longitude.- Returns:
- the longitude
-
getMode
Returns the mode.- Returns:
- the mode
-
getType
Returns the type.- Returns:
- the type
-
getWidth
Returns the width.- Returns:
- the width
-
getZoom
Returns the zoom.- Returns:
- the zoom
-
setHeight
Sets the height.- Parameters:
height
- the height to set
-
setLat
Sets the latitude.- Parameters:
lat
- the latitude to set
-
setLng
Sets the longitude.- Parameters:
lng
- the longitude to set
-
setMode
Sets the mode.- Parameters:
mode
- the mode to set
-
setType
Sets the type.- Parameters:
type
- the type to set
-
setWidth
Sets the width.- Parameters:
width
- the width to set
-
setWrappedValue
Sets the value that is wrapped. The method is added for convenient usage of the class in JSPs. In a formatter JSP you can use
instead of setting the value directly via the constructor.<jsp:useBean id="map" class="org.opencms.widgets.CmsLocationPickerWidgetValue" /> <jsp:setProperty name="map" property="wrappedValue" value="${content.value.Map}" />
- Parameters:
value
- The string value that should be wrapped as CmsLocationPickerWidgetValue.
-
setZoom
Sets the zoom.- Parameters:
zoom
- the zoom to set
-
toString
-
parseOptions
Parses the given configuration String.- Parameters:
configuration
- the configuration String to parse
-