Class LeafletOperation
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.operations.LeafletOperation
- All Implemented Interfaces:
Serializable
LeafletOperation class contains all pieces of information is required
to perform function invocations on client-side e.g. flyTo() on map.- Since:
- 2020-03-11
- Version:
- 1.0
- Author:
- Gabor Kokeny Email: kokeny19@gmail.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLeafletOperation(Identifiable target, String functionName, Serializable... arguments) Creates a new operation describing a client-side function call on the given target. -
Method Summary
Modifier and TypeMethodDescriptionReturns the operation arguments serialized to JSON.Returns the name of the function to invoke on the client side.Returns the id of the target layer the function is called on.booleanReturns whether the operation targets a control rather than a layer.
-
Constructor Details
-
LeafletOperation
Creates a new operation describing a client-side function call on the given target.- Parameters:
target- the client object (layer or control) the function is called onfunctionName- the name of the function to invokearguments- the arguments passed to the function
-
-
Method Details
-
getLayerId
Returns the id of the target layer the function is called on.- Returns:
- the layerId
-
getFunctionName
Returns the name of the function to invoke on the client side.- Returns:
- the functionName
-
isControlOperation
public boolean isControlOperation()Returns whether the operation targets a control rather than a layer.- Returns:
trueif the target is a control
-
getArguments
Returns the operation arguments serialized to JSON.- Returns:
- the arguments
-