CoffeeMapboxMarker class

Represents a map marker in Coffee Mapbox.

The marker consists of a unique ID, geographic position, and an image asset. The library is optimized for square images, which ensures proper scaling and consistent appearance. The library will automatically optimize the size for rendering on different screens and densities.

Constructors

CoffeeMapboxMarker({required String id, required LatLng position, required String assetPath})
Creates a new CoffeeMapboxMarker instance.

Properties

assetPath → String
Path to a local asset image (PNG recommended).
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier for this marker.
final
position → LatLng
Geographic position of the marker.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadImageBytes() → Future<Uint8List?>
Loads the asset PNG and converts it into bytes suitable for Mapbox markers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Future<Map<String, dynamic>>
Converts the marker to a JSON-compatible map to send to native code.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited