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
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration class for defining the map mode.static enumEnumeration class for defining the map types. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default map height in pixels.static final floatThe default latitude.static final floatThe default longitude.static final CmsLocationPickerWidgetValue.MapModeThe default map mode.static final CmsLocationPickerWidgetValue.MapTypeThe default map type.static final intThe default map width in pixels.static final intThe default zoom level.static final StringOption height.static final StringOption lat.static final StringOption lng.static final StringOption mode.static final StringOption type.static final StringOption width.static final StringOption zoom. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty widget option object.Creates a new widget value object, configured by the given value String. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height.floatgetLat()Returns the lat.floatgetLng()Returns the longitude.getMode()Returns the mode.getType()Returns the type.intgetWidth()Returns the width.intgetZoom()Returns the zoom.protected voidparseOptions(String configuration) Parses the given configuration String.voidsetHeight(int height) Sets the height.voidsetLat(float lat) Sets the latitude.voidsetLng(float lng) Sets the longitude.voidSets the mode.voidSets the type.voidsetWidth(int width) Sets the width.voidsetWrappedValue(String value) Sets the value that is wrapped.voidsetZoom(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.invalid input: '<'jsp:useBean id="map" class="org.opencms.widgets.CmsLocationPickerWidgetValue" /> invalid input: '<'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
-