agus_maps_flutter library

Classes

AgusMap
A Flutter widget that displays a CoMaps map.
AgusMapController
Controller for programmatic control of an AgusMap.
CountriesData
Parsed countries.txt data (JSON format from CoMaps CDN)
DeleteResult
Result of a map deletion operation.
FileValidationResult
Result of validating a single MWM file against its metadata.
Mirror
Represents a mirror server hosting MWM files.
MirrorConfig
Mirror server configuration
MirrorDiscoveryResult
Result of runtime mirror discovery.
MirrorService
Service for discovering and downloading MWM files from CoMaps CDN servers.
MirrorStatus
Result of checking a mirror's availability
MwmMetadata
Metadata for a downloaded or bundled MWM map file.
MwmRegion
Represents a downloadable MWM region from countries.txt (JSON format)
MwmStorage
Storage service for MWM file metadata.
Snapshot
Represents a snapshot version (YYMMDD format)

Enums

TouchType
Touch event types

Constants

comapsMetaserverUrl → const String
CoMaps metaserver URL for discovering active servers
defaultMirrors → const List<MirrorConfig>
Default CoMaps CDN servers (verified working) URL structure: <base>/maps/<version>/<file>

Functions

createMapSurface({int? width, int? height, double? density}) Future<int>
Create a map rendering surface with the given dimensions. If width/height are not specified, uses the screen size. density is the device pixel ratio (e.g., 1.5 for 150% scaling on Windows).
debugCheckPoint(double lat, double lon) → void
Debug: Check if a lat/lon point is covered by any registered MWM. Output goes to Android logcat (tag: AgusMapsFlutterNative).
debugListMwms() → void
Debug: List all registered MWMs and their bounds. Output goes to Android logcat (tag: AgusMapsFlutterNative).
extractDataFiles() Future<String>
Extract all CoMaps data files (classificator, types, categories, etc.) Returns the path to the directory containing the extracted files.
extractMap(String assetPath) Future<String>
forceRedraw() → void
Force a complete redraw by updating the map style.
getApkPath() Future<String>
init(String apkPath, String storagePath) → void
initWithPaths(String resourcePath, String writablePath) → void
Initialize CoMaps with separate resource and writable paths
invalidateMap() → void
Invalidate the current viewport to force tile reload. Call this after registering maps to ensure tiles are refreshed.
loadMap(String path) → void
registerSingleMap(String fullPath) int
Register a single MWM map file directly by full path.
registerSingleMapWithVersion(String fullPath, int version) int
Register a single MWM map file directly by full path, with an explicit snapshot version (e.g. 251209).
resizeMapSurface(int width, int height, {double? density}) Future<void>
Resize the map surface to new dimensions.
scaleMap(double factor, double pixelX, double pixelY, {bool animated = false}) → void
Scale (zoom) the map by a factor, centered on a specific pixel point.
scrollMap(double distanceX, double distanceY) → void
Scroll/pan the map by pixel distance.
sendTouchEvent(TouchType type, int id1, double x1, double y1, {int id2 = -1, double x2 = 0, double y2 = 0}) → void
Send a touch event to the map engine.
setView(double lat, double lon, int zoom) → void
sum(int a, int b) int
A very short-lived native function.
sumAsync(int a, int b) Future<int>
A longer lived native function, which occupies the thread calling it.