toJson abstract method
Serializes this annotation to JSON.
Implement this to define how your custom annotation is persisted. Include all properties needed to recreate the annotation.
The JSON should include at minimum:
- 'id': The annotation's unique identifier
- 'type': The annotation type string
- 'x', 'y': Position coordinates
- Any custom properties specific to your annotation
Implementation
Map<String, dynamic> toJson();