Class CmsLocationController
java.lang.Object
org.opencms.gwt.client.ui.input.location.CmsLocationController
The location picker controller.
-
Constructor Summary
ConstructorDescriptionCmsLocationController
(CmsLocationPicker picker, String configuration) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gwt.core.client.JavaScriptObject
Return a maps API position object according the the current location value.Returns the current location value.Returns the JSON string representation of the current value.protected void
onAddressChange
(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion) Called on address suggestion selection.protected void
onAddressChange
(String address) Called on address value change.protected void
onCancel()
Cancels the location selection.protected void
onHeightChange
(String height) Called on height value change.protected void
onLatitudeChange
(String latitude) Called on latitude value change.protected void
onLongitudeChange
(String longitude) Called on longitude value change.protected void
onModeChange
(String mode) Called on mode value change.protected void
onOk()
Sets the selected location value.protected void
Ensures the preview map has the right size and is centered.protected void
onTypeChange
(String type) Called on map type change.protected void
onWidthChange
(String width) Called on width value change.protected void
onZoomChange
(String zoom) Called on zoom value change.void
setStringValue
(String value) Sets the location value as string.
-
Constructor Details
-
CmsLocationController
Constructor.- Parameters:
picker
- the picker widgetconfiguration
- the widget configuration
-
-
Method Details
-
getLocationValue
Returns the current location value.- Returns:
- the location value
-
getStringValue
Returns the JSON string representation of the current value.- Returns:
- the JSON string representation
-
setStringValue
Sets the location value as string.- Parameters:
value
- the string representation of the location value (JSON)
-
getCurrentPosition
Return a maps API position object according the the current location value.- Returns:
- the position object
-
onAddressChange
Called on address value change.- Parameters:
address
- the new address
-
onAddressChange
Called on address suggestion selection.- Parameters:
suggestion
- the selected suggestion
-
onCancel
Cancels the location selection. -
onHeightChange
Called on height value change.- Parameters:
height
- the height
-
onLatitudeChange
Called on latitude value change.- Parameters:
latitude
- the latitude
-
onLongitudeChange
Called on longitude value change.- Parameters:
longitude
- the longitude
-
onModeChange
Called on mode value change.- Parameters:
mode
- the mode
-
onOk
Sets the selected location value. -
onPreviewResize
Ensures the preview map has the right size and is centered. -
onTypeChange
Called on map type change.- Parameters:
type
- the map type
-
onWidthChange
Called on width value change.- Parameters:
width
- the width
-
onZoomChange
Called on zoom value change.- Parameters:
zoom
- the zoom
-