GeometryManager class

Manager for handling vector geometry features, GeoJSON loading, and styling.

Constructors

GeometryManager(MapLibreMapController mapController, {dynamic onGeometryTap(String featureId, Map<String, dynamic>? properties)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
mapController MapLibreMapController
final
onGeometryTap → dynamic Function(String featureId, Map<String, dynamic>? properties)?
Callback triggered when a supported feature is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceIds List<String>
Expose tracked geometry source IDs
no setter

Methods

addGeoJson(String sourceId, Map<String, dynamic> geoJson) Future<void>
Adds a GeoJSON source to the map.
addIndoorExtrusionLayer(String sourceId, {String layerId = 'pm-indoor-3d', dynamic fillColor = '#4f46e5', dynamic filter}) Future<void>
Renders a 3D extrusion layer (e.g., for indoor buildings) from GeoJSON data.
addPolygonLayer(String sourceId, {String layerId = 'pm-polygon-layer', dynamic fillColor = '#FF0000', dynamic fillOpacity = 0.5, dynamic outlineColor, dynamic filter}) Future<void>
Renders a polygon layer from the provided GeoJSON source.
addPolylineLayer(String sourceId, {String layerId = 'pm-polyline-layer', dynamic lineColor = '#0000FF', dynamic lineWidth = 3.0, dynamic lineOpacity = 1.0, dynamic filter}) Future<void>
Renders a polyline layer from the provided GeoJSON source.
addSymbolLayer(String sourceId, {String layerId = 'pm-symbol-layer', dynamic iconImage, dynamic textField, dynamic textColor = '#000000', dynamic filter}) Future<void>
Renders a symbol layer (icons/text) from the provided GeoJSON source.
clear() Future<void>
Removes all geometries added via GeometryManager.
export([String? id, Map<String, dynamic>? options]) Future<Map<String, dynamic>?>
Exports current geometry data to GeoJSON. Alias for getGeoJSON to match Web SDK.
getGeoJSON([String? id, Map<String, dynamic>? options]) Future<Map<String, dynamic>?>
Retrieve geometry data in GeoJSON format.
importGeoJson(String sourceId, Map<String, dynamic> geoJson, {bool autoRender = true, Map<String, dynamic>? options}) Future<void>
Imports GeoJSON and optionally renders it automatically.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeGeometry(String sourceId) Future<void>
Removes a geometry layer and its corresponding source.
setLayerFilter(String sourceId, dynamic filter) Future<void>
Sets a filter on all layers associated with a geometry source.
setOpacity(String sourceId, double opacity) Future<void>
Real-time opacity adjustment for a geometry source using Expressions.
toString() String
A string representation of this object.
inherited
updateGeoJson(String sourceId, Map<String, dynamic> geoJson) Future<void>
Refreshes/updates the GeoJSON data for an existing source.

Operators

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