Marker class
Display markers to identify locations on Woosmap Map.
Markers are used to display clickable/draggable icons on the map. You can attach a wide variety of event listeners to control user interaction.
Constructors
-
Marker(Map<
String, dynamic> markerOptions, WoosmapController _webcontroller, {dynamic click(dynamic)?, dynamic mouseover(dynamic)?, dynamic mouseout(dynamic)?, dynamic clickable_changed(dynamic)?, dynamic cursor_changed(dynamic)?, dynamic icon_changed(dynamic)?, dynamic position_changed(dynamic)?, dynamic dragstart(dynamic)?, dynamic drag(dynamic)?, dynamic dragend(dynamic)?, dynamic draggable_changed(dynamic)?, dynamic visible_changed(dynamic)?, dynamic zIndex_changed(dynamic)?}) -
Default Constructor which accepts
markerOptions
as a JSON object. This will soon be deprected. Please use Marker.create to create the object. - Marker.create(MarkerOptions markerOptions, WoosmapController _webcontroller, {dynamic click(dynamic)?, dynamic mouseover(dynamic)?, dynamic mouseout(dynamic)?, dynamic clickable_changed(dynamic)?, dynamic cursor_changed(dynamic)?, dynamic icon_changed(dynamic)?, dynamic position_changed(dynamic)?, dynamic dragstart(dynamic)?, dynamic drag(dynamic)?, dynamic dragend(dynamic)?, dynamic draggable_changed(dynamic)?, dynamic visible_changed(dynamic)?, dynamic zIndex_changed(dynamic)?})
- Constructor which accepts MarkerOptions object.
Properties
- click → (dynamic Function(dynamic)?)
-
This event is fired when the marker was clicked.
final
- clickable_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers clickable property changes.
final
- cursor_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers cursor property changes.
final
- drag → (dynamic Function(dynamic)?)
-
Fired while dragging
final
- dragend → (dynamic Function(dynamic)?)
-
Fired when the marker is finished being dragged
final
- draggable_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers draggable property changes.
final
- dragstart → (dynamic Function(dynamic)?)
-
Fired when dragging starts
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers icon property changes.
final
- markerOptions ↔ MarkerOptions
-
The MarkerOptions object
getter/setter pair
- mouseout → (dynamic Function(dynamic)?)
-
This event is fired when the mouse leaves the area of the marker.
final
- mouseover → (dynamic Function(dynamic)?)
-
This event is fired when the mouse enters the area of the marker.
final
- position_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers position property changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- visible_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers visible property changes.
final
- zIndex_changed → (dynamic Function(dynamic)?)
-
This event is fired when markers zIndex property changes.
final
Methods
-
add(
) → Future< void> - Added Marker
-
getDraggable(
) → Future< bool> - Returns true if the marker can be dragged
-
getOffset(
) → Future< WoosPoint> - Get the marker’s offset.
-
getOpacity(
) → Future< double> - Sets the marker opacity.
-
getPitchAlignment(
) → Future< String> - Returns the current pitchAlignment property of the marker.
-
getPosition(
) → Future< LatLng> - Get the marker’s geographical location.
-
getRotation(
) → Future< num> - Returns the current rotation angle of the marker (in degrees).
-
getRotationAlignment(
) → Future< String> - Returns the current rotationAlignment property of the marker.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processEvent(
String eventName, dynamic data) → void -
reference(
) → String - Return unique reference for StoreOverlay
-
remove(
) → Future< void> - Remove Marker
-
setDraggable(
bool shouldBeDraggable) → Future< void> - Sets the draggable property and functionality of the marker
-
setIcon(
{String? url, WoosIcon? icon}) → Future< void> - Sets icon to marker.
-
setOffset(
WoosPoint offset) → Future< void> - Sets the offset of the marker
-
setOpacity(
num opacity) → Future< void> - Sets the marker opacity.
-
setPitchAlignment(
String alignment) → Future< void> - Sets the pitchAlignment property of the marker.
-
setPosition(
LatLng position, {bool animate = false, int duration = 1000}) → Future< void> - Sets the position of the marker
-
setRotation(
num rotation) → Future< void> - Sets the rotation property of the marker.
-
setRotationAlignment(
String alignment) → Future< void> - Sets the rotationAlignment property of the marker.
-
toString(
) → String -
A string representation of this object.
inherited
-
woosmapObject(
) → String -
Return Woosmap Marker
https://developers.woosmap.com/products/map-api/reference/1.4/#woosmap.map.Marker
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited