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

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

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
0
points
194
downloads

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)
View/report issues

License

unknown (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