Class CmsLocationController
java.lang.Object
org.opencms.gwt.client.ui.input.location.CmsLocationController
The location picker controller.
-
Constructor Summary
ConstructorsConstructorDescriptionCmsLocationController(CmsLocationPicker picker, String configuration) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gwt.core.client.JavaScriptObjectReturn 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 voidonAddressChange(com.google.gwt.user.client.ui.SuggestOracle.Suggestion suggestion) Called on address suggestion selection.protected voidonAddressChange(String address) Called on address value change.protected voidonCancel()Cancels the location selection.protected voidonHeightChange(String height) Called on height value change.protected voidonLatitudeChange(String latitude) Called on latitude value change.protected voidonLongitudeChange(String longitude) Called on longitude value change.protected voidonModeChange(String mode) Called on mode value change.protected voidonOk()Sets the selected location value.protected voidEnsures the preview map has the right size and is centered.protected voidonTypeChange(String type) Called on map type change.protected voidonWidthChange(String width) Called on width value change.protected voidonZoomChange(String zoom) Called on zoom value change.voidsetStringValue(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
-