SocialOverlay class abstract Routes & Navigation

Static service for crowd-sourced social event reporting and interaction.

Provides a complete system for creating, managing, and interacting with user-generated reports about real-time road conditions and incidents. Reports include accidents, police presence, traffic conditions, road hazards, weather hazards, fixed cameras, and road closures. All operations execute asynchronously with callback-based result delivery.

Users can create reports with categories, descriptions, images, and custom parameters. Reports can be prepared from the device's current position (via PositionService data source) or from explicit coordinates.

Reports are visible to all users with the social overlay enabled and a compatible map style. Each report displays for a limited duration before automatic removal. Reports with many downvotes are removed earlier.

Prerequisites

  • Active PositionService with high-accuracy data source for most report categories (exception: Weather Hazard).
  • Social reports overlay enabled on map (see AlarmService for alarm events).

See also:

Constructors

SocialOverlay()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

reportsOverlayInfo SocialReportsOverlayInfo
Provides access to social report category hierarchy and metadata.
no setter
transferStatistics TransferStatistics
Provides network traffic statistics for social reports operations.
no setter

Static Methods

addComment({required OverlayItem item, required String comment, void onComplete(GemError error)?}) → EventHandler?
Adds a text comment to an existing social report.
cancel(EventHandler handler) → void
Cancels an ongoing social overlay operation.
confirmReport(OverlayItem item, {void onComplete(GemError error)?}) → EventHandler?
Provides positive feedback (upvote) for a report.
deleteReport(OverlayItem item, {void onComplete(GemError error)?}) → EventHandler?
Permanently removes a user's own report.
denyReport(OverlayItem item, {void onComplete(GemError error)?}) → EventHandler?
Provides negative feedback (downvote) for an inaccurate report.
getReportSnapshot({required OverlayItem item, required void onComplete(GemError error, Img? imageInfo)}) ProgressListener?
Retrieves the image snapshot associated with a social report.
prepareReporting({DataSource? dataSource, int categId = 0}) int
Prepares a report using the device's current high-accuracy position.
prepareReportingCoords(Coordinates coords, {int categId = 0}) int
Prepares a report for submission using explicit coordinates.
registerReportListener(OverlayItem report, SocialReportListener listener) GemError
Registers a listener to monitor changes to a specific social report.
report({required int prepareId, required int categId, String description = '', Uint8List? snapshot, ImageFileFormat? format, ParameterList? params, void onComplete(GemError error)?}) → EventHandler?
Submits a prepared social event report to the community.
unregisterReportListener(OverlayItem report, SocialReportListener listener) GemError
Unregisters a listener from monitoring a specific social report.
updateReport({required OverlayItem item, required SearchableParameterList params, void onComplete(GemError error)?}) → EventHandler?
Modifies parameters of an existing owned report.