powermap_sdk 0.3.0
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 #
Navigation Camera Mode (2D/3D) #
- New:
setCameraMode2D()— switches camera to 0° tilt (top-down view) with smoothanimateCameratransition. - New:
setCameraMode3D()— switches camera to 70° tilt (perspective view) with smooth transition. - New:
is2DModegetter — returns whether the navigator is currently in 2D mode. - All internal hardcoded
tilt: 70.0values replaced with the_cameraTiltstate variable, ensuring consistent behavior acrossstartNavigation(),setTracking(),_animateGpsInterpolation(), and_updateSimulationFrame().
Navigation Localization (Dynamic Language) #
- 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 toaddGeoJsonSource()+addLineLayer()withbelowLayerIdsupport. - 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 legacyclearLines()fallback.
Indoor Mapping (IMDF) #
- Fix:
IMDFConverter— correctedvenueandbuildingkind classification. Previously both were incorrectly mapped to'floor', now correctly return'venue'and'building'respectively. - New: IMDF conversion re-enabled in
GeometryManager.getGeoJSON()andexport(). ThetoIMDF()path was previously commented out; it is now active for both single-feature and bulk retrieval. - New:
IndoorManageris now integrated intoPowerMapControllerascontroller.indoor, providing a unified facade access point.
Geometry Manager Improvements #
- Refactored:
importGeoJson()now creates shared geometry-type layers (polygon, line, symbol) withgeometry-typefilters, 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
_layerBaseFiltersmap tracks base filters per layer for correct filter compositing.
Widget Marker Coordinate Fix #
- Fix:
PowerMapwidget now correctly appliesdevicePixelRatiowhen converting geographic coordinates to screen positions for widget markers. Fixes misaligned widget markers on high-DPI devices.
0.2.0 #
- New:
opacityparameter added toaddMarker()— set initial marker visibility (0.0 = invisible, 1.0 = fully visible). - New:
setMarkersOpacity(double opacity)method onPowerMapController— bulk-sets opacity of all native GL markers (Circles and Symbols) in a single call. - Fix:
circleStrokeOpacityandiconOpacitynow correctly reflect theopacityparameter 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.