Geographic topic
This module provides a compact set of value objects and spatial primitives for working with geographic locations, bounding areas, and route geometry in WGS‑84 coordinates. Use these classes to represent points on the globe, define search or geofence boundaries, compute containment and centroids, and manipulate linear path data. Key concepts include coordinate precision, axis-aligned bounding rectangles, polygonal and circular area representations, and tile-based coverage for complex regions.
Coordinates: Represents a position in WGS‑84 (latitude, longitude and optional altitude). Use this value object wherever a geographic point is required; it supports distance and azimuth calculations, validation and cloning.GeographicArea: Abstract base that defines common spatial operations such as containment testing, bounding-box calculation, center point access and conversion between area types. Implementations provide concrete algorithms for area math - seeCircleGeographicArea,RectangleGeographicArea,PolygonGeographicArea, andTilesCollectionGeographicAreafor details.CircleGeographicArea: Circular region defined by a centerCoordinatesand a radius in meters. Ideal for proximity checks and simple geofencing; provides bounding-box computation and conversion support.RectangleGeographicArea: Axis-aligned rectangle defined by top-left and bottom-rightCoordinates. Use it for bounding boxes, search areas, and map viewport calculations; includes intersection, union, containment, and construction helpers. Is always aligned to latitude/longitude axes.PolygonGeographicArea: Arbitrary polygon defined by an ordered list ofCoordinatesvertices. Use polygons for precise administrative or irregular area shapes, centroid computation, and point-in-polygon containment tests.TilesCollectionGeographicArea: Area represented as a collection of map tiles.Path: An ordered sequence ofCoordinatesrepresenting a linear geometry; supports creation from raw coordinates or binary files, cloning, export to multiple formats, and converting to a landmark list for routing.PathMatch: Lightweight result model representing the outcome of a hit-test against a path collection (includes the matched path index, the matched coordinates, distance and segment index).
The geographic components work together to provide a consistent spatial model: Coordinates are the core data unit, area types wrap coordinates into meaningful spatial extents, and Path objects model linear geometry used by routing and map display. Together they enable accurate containment checks, bounding-box calculations, centroid computations and conversions between area representations which simplifies search, routing, and geofencing workflows.
Use Coordinates as the canonical representation of points, then choose the area type that best matches your use case: RectangleGeographicArea for simple bounds and search hints, CircleGeographicArea for proximity filters and radius-based geofencing, PolygonGeographicArea for precise irregular boundaries. These models are used throughout the SDK to define search areas, geofences, and other geographical indicators.
Learn more about geographic base entities: https://developer.magiclane.com/docs/flutter/guides/core/base-entities
Classes
- CircleGeographicArea Geographic
- Circular geographic area defined by center coordinates and radius in meters.
- Coordinates Geographic
- Represents a geographic position in the WGS‑84 coordinate system.
- GeographicArea Geographic
- Abstract base class for representing geographic areas on the WGS 84 ellipsoid.
- Path Geographic
- Represents a path object containing an ordered list of geographic coordinates.
- PathMatch Geographic
-
Represents a match result when performing a hit test on a
MapViewPathCollection. - PolygonGeographicArea Geographic
- Polygonal geographic area defined by a sequence of coordinate vertices.
- RectangleGeographicArea Geographic
- Rectangular geographic area aligned with latitude and longitude lines.
- TilesCollectionGeographicArea Geographic
- Geographic area represented as a collection of map tiles.
Enums
- GeographicAreaType Geographic
- Enumeration of supported geographic area types for spatial representation.
- PathFileFormat Geographic
- Supported file formats for importing and exporting Path data.