powermap_sdk 0.10.0 copy "powermap_sdk: ^0.10.0" to clipboard
powermap_sdk: ^0.10.0 copied to clipboard

A comprehensive Flutter SDK for PowerMap, offering location plotting, geometry measurements, layer management, routing, search, and tracking.

0.10.0 #

  • Fix: Suppressed compass/magnetometer updates during rerouting and for an 8-second stabilization window to prevent vehicle arrow spinning in vehicles.
  • Fix: Implemented road-bearing lookahead (>= 5 meters along new route) to establish an accurate and stable initial heading after reroute.
  • Fix: Reset stale GPS anchors (_lastGpsPos and _smoothedGps) to the new route geometry, eliminating cross-median angle calculation bugs.
  • Fix: Added guard for Android devices reporting invalid heading 0.0 when compass is unavailable.
  • Fix: Immediately wiped old traveled-route-source GeoJSON on reroute to prevent ghost polyline remnants.
  • New: Added onRerouted callback to PowerMapNavigator to notify host applications of route replacement.

Search & Geocoding #

  • New: Added support for nationwide search when proximity is omitted.
  • Update: Implemented automatic two-phase fallback in PowerMapGeocodingService — expands to nationwide search when proximity search returns fewer than 3 results.

0.9.0 #

  • Update: Added _userPreferredTilt to maintain user-selected camera mode (2D / 3D) across turn approaches, pause/resume, and rerouting cycles.
  • Update: is2DMode getter now accurately reflects user-preferred camera mode rather than transient camera tilt states.
  • Fix: Smooth restoration of user-preferred zoom and tilt levels after completing turn maneuver approaches.

Rerouting Improvements & Traveled Route Layering #

  • New: Added _reorderTraveledRouteLayers to ensure traveled route and off-route connector layers are properly re-layered above new route polylines after dynamic rerouting.
  • Update: Synchronized initial camera bearing immediately upon reroute completion for seamless heading alignment with the new route geometry.

0.8.0 #

Speed Limit API #

  • New: Integrated PowerMap Speed Limit API (/api/v2/map/speed-limit).
  • New: Added SpeedLimitService with a 4-layer throttling engine (Road Segment ID ogc_fid cache, 30m distance filter, 4s time cooldown, in-flight request lock) to prevent excessive backend API calls.
  • New: Extended NavigationState with speedLimit and speedLimitResult fields.

Turn-by-Turn Dynamic Step Arrows #

  • New: Introduced dynamic turn maneuver guidance arrows rendered directly on the navigation polyline (drawStepTurnArrows).
  • New: 3-layer arrow rendering system (Casing line, White core line, Arrowhead symbol layer) featuring Google Maps style zoom level interpolation for realistic scaling.
  • New: Added clearStepTurnArrows and disposeStepTurnArrows lifecycle methods.

Search & Auto-Language Script Detection #

  • New: lang parameter default updated to 'auto' across search and autocomplete methods.
  • New: Automatic script detection (Thai / English / Mixed) with multi-endpoint fallback querying and GID deduplication.
  • New: Extended PowerMapSearchResult with nameTh, nameEn, addressTh, and addressEn fields for localized property formatting.
  • Update: Smart Camera Offset (_offsetCameraTarget) in 3D perspective navigation to position the vehicle arrow down-screen and extend forward road visibility.
  • Update: Route polyline line caps updated to round for smooth segment join rendering.
  • Update: Added transportation profile parameter preservation to PowerMapRouteResult.

0.7.0 #

  • Fix: Replaced the iOS layer Z-Index workaround with a robust dynamic Route Trimming algorithm. The active blue route is now physically trimmed as the vehicle progresses, completely preventing overlap with the traveled path.
  • Fix: Changed route lineCap to butt to prevent visual bleeding and overlap artifacts at segment joints.
  • Fix: Resolved an iOS MapLibre crash caused by passing a 1-point LineString for the traveled route by duplicating the point to form a valid zero-length line.

0.6.0 #

  • Fix: Resolved an iOS-specific Z-Index bug where the blue planned route would incorrectly draw over the gray traveled route path.

0.5.0 #

  • Update: Smoothed map polyline rendering with rounded line joints and caps.
  • Update: Improved Navigation Camera UX with smooth, interpolated "slide" transitions and adaptive 2D/3D toggles.
  • Update: Optimized GPS responsiveness and accuracy with adjusted update throttling and accuracy thresholds.
  • Fix: Fixed visual and behavioral issues in Navigation Simulation UX, including vehicle marker animation and traveled route path overlapping.

0.4.0 #

  • New: Introduced Navigation 2.0 engine with completely revamped internal math algorithms for smoother vehicle tracking.
  • New: Added Smart Arrival Detection that accurately determines trip completion in both Simulation and GPS modes.
  • New: Added 3-Stage Voice Guidance pre-announcements for upcoming maneuvers.
  • New: Added Audio Ducking support on iOS to improve navigation voice clarity over background audio.
  • New: Added Estimated Time of Arrival (ETA) and Current Speed to the public navigation state.
  • New: Integrated Background Navigation capabilities (Android Foreground Services & iOS Background Modes).
  • New: Added Screen Wakelock support to keep the display active during navigation.
  • Update: Improved the Camera Bearing system to be adaptive based on vehicle speed, resulting in smoother map rotations.
  • Update: Enhanced the Snap-to-Road algorithm to prevent incorrect snapping on complex routes (like U-turns and parallel roads).
  • Update: Upgraded the GPS filtering mechanism with adaptive accuracy thresholds to handle poor signal areas better.
  • Update: Optimized Simulation Mode with a dynamic speed curve that intelligently slows down before sharp turns.
  • Fix: Fixed an issue where the vehicle marker would incorrectly jump to the starting point of a route before getting the first GPS lock.
  • Fix: Fixed a problem where the camera movement appeared jerky on certain low-speed or high-noise segments.

0.3.1 #

3D Map Tiles (fill-extrusion) #

  • New: enable3DBuildings parameter added to PowerMap constructor. Default is true.
  • New: 3D buildings (fill-extrusion layers) will now be rendered automatically when the map is tilted, provided enable3DBuildings is true.
  • Update: Style caching now uses separate cache files (_2d and _3d) to prevent style interference when toggling 3D capabilities.
  • Update: initialCameraPosition no longer forces a 60-degree tilt by default; it strictly follows the initialTilt parameter (defaults to 0.0) regardless of the 3D setting.

0.3.0 #

  • New: setCameraMode2D() — switches camera to 0° tilt (top-down view) with smooth animateCamera transition.
  • New: setCameraMode3D() — switches camera to 70° tilt (perspective view) with smooth transition.
  • New: is2DMode getter — returns whether the navigator is currently in 2D mode.
  • All internal hardcoded tilt: 70.0 values replaced with the _cameraTilt state variable, ensuring consistent behavior across startNavigation(), setTracking(), _animateGpsInterpolation(), and _updateSimulationFrame().
  • New: setNavigationLanguage(String lang) — dynamically sets the navigation language ('th' or 'en') for both API calls and TTS voice guidance.
  • Fix: _performReroute() now uses the active navigation language instead of a hardcoded 'en', preventing language mixing during rerouting.
  • Fix: _initTts() now initializes the TTS locale based on the active navigation language, ensuring consistent pronunciation.

Route Rendering (GeoJSON Z-Index) #

  • Breaking: Route line rendering refactored from addLine() annotations to addGeoJsonSource() + addLineLayer() with belowLayerId support.
  • Route lines are now drawn underneath road number labels and text labels at all zoom levels.
  • Added _findLabelLayerId() helper that auto-discovers the map style's first label/symbol layer.
  • clearRoutes() now properly removes GeoJSON layers and source, with legacy clearLines() fallback.

Indoor Mapping (IMDF) #

  • Fix: IMDFConverter — corrected venue and building kind classification. Previously both were incorrectly mapped to 'floor', now correctly return 'venue' and 'building' respectively.
  • New: IMDF conversion re-enabled in GeometryManager.getGeoJSON() and export(). The toIMDF() path was previously commented out; it is now active for both single-feature and bulk retrieval.
  • New: IndoorManager is now integrated into PowerMapController as controller.indoor, providing a unified facade access point.

Geometry Manager Improvements #

  • Refactored: importGeoJson() now creates shared geometry-type layers (polygon, line, symbol) with geometry-type filters, instead of creating individual per-feature layers. This significantly reduces layer count for complex IMDF datasets.
  • New: setLayerFilter(sourceId, filter) — applies a composited filter (merged with base geometry-type filter via ['all', ...]) to all layers of a source. Enables dynamic floor switching without re-importing data.
  • New: Internal _layerBaseFilters map tracks base filters per layer for correct filter compositing.

Widget Marker Coordinate Fix #

  • Fix: PowerMap widget now correctly applies devicePixelRatio when converting geographic coordinates to screen positions for widget markers. Fixes misaligned widget markers on high-DPI devices.

0.2.0 #

  • New: opacity parameter added to addMarker() — set initial marker visibility (0.0 = invisible, 1.0 = fully visible).
  • New: setMarkersOpacity(double opacity) method on PowerMapController — bulk-sets opacity of all native GL markers (Circles and Symbols) in a single call.
  • Fix: circleStrokeOpacity and iconOpacity now correctly reflect the opacity parameter when creating markers.
  • These two additions enable smooth fade-in animation when refreshing markers, eliminating the visual "flash" from clearMarkers() + re-add cycles.

0.1.0 #

  • Initial pre-release of PowerMap SDK.
  • Core managers implemented: Geometry, Map, Routing, Search, Tracking, Layer, Cluster.
  • Facade API accessible via PowerMapController.
1
likes
140
points
175
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter SDK for PowerMap, offering location plotting, geometry measurements, layer management, routing, search, and tracking.

Homepage
Repository (GitLab)

License

MIT (license)

Dependencies

flutter, flutter_background_service, flutter_compass, flutter_tts, font_awesome_flutter, geolocator, http, maplibre_gl, path_provider

More

Packages that depend on powermap_sdk