NeshanCircle class

A model representing a circle on a Neshan map.

This class encapsulates all the properties needed to display a circle using Mapbox GL JS GeoJSON sources and circle layers.

Usage Example

import 'package:flutter/material.dart';
import 'package:latlong2/latlong.dart';
import 'package:neshan_maps_flutter/map.dart';

final circle = NeshanCircle(
  id: 'poi1',
  center: LatLng(35.6892, 51.3890),
  radius: 500, // meters
  fillColor: Colors.green.withOpacity(0.2),
  strokeColor: Colors.green,
  strokeWidth: 2,
);

Constructors

NeshanCircle({required String id, required LatLng center, double radius = 100.0, Color? fillColor, double fillOpacity = 0.3, Color? strokeColor, double strokeWidth = 2.0, double strokeOpacity = 1.0})
Creates a new circle.
const

Properties

center → LatLng
The center point of the circle.
final
fillColor → Color?
Optional fill color for the circle.
final
fillOpacity → double
The opacity of the circle fill.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
Unique identifier for the circle.
final
radius → double
The radius of the circle in meters.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strokeColor → Color?
Optional stroke (outline) color for the circle.
final
strokeOpacity → double
The opacity of the circle outline.
final
strokeWidth → double
The width of the circle outline in pixels.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this circle to a JSON object for serialization.
toString() → String
A string representation of this object.
override

Operators

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