google_maps_native_sdk 0.3.0
google_maps_native_sdk: ^0.3.0 copied to clipboard
Native Google Maps plugin for Flutter/FlutterFlow with markers, polylines, caching, events — ideal for mobility apps (e.g., taxi).
Changelog #
0.3.0 #
EN
- Android: MapView receives full host lifecycle (start/resume/pause/stop/destroy). Map is revealed only after OnMapLoadedCallback; emits
event#onMapLoaded
(exposed in Dart asonMapLoaded
). - iOS: Reveal map only after content is ready (snapshotReady), also emits
event#onMapLoaded
. - iOS: Update polyline in place by changing
GMSPolyline.path
(no recreation). New channel methodpolylines#updatePoints
. - Android: Update polyline points in place via
Polyline.setPoints(...)
. New channel methodpolylines#updatePoints
. - Dart API: Added
updatePolylinePoints(String id, List<LatLng>)
andonMapLoaded
future inGoogleMapController
. - Markers: URL icons decoded off-main-thread and resized to ~48dp; default anchor is now (u=0.5, v=0.62).
- Static map: Added
StaticMapView
(Google Static Maps) with optional polyline, useful for Windows/desktop fallback. - Docs: README expanded with examples (onMapLoaded, updatePolylinePoints, static map, and best practices for high-frequency polyline updates – "snake": decimation + 16–32ms throttle without remove/add each frame).
PT-BR (ASCII)
- Android: MapView agora recebe todos os lifecycles do host. Mapa aparece somente apos OnMapLoadedCallback; emite
event#onMapLoaded
(Dart:onMapLoaded
). - iOS: Revela o mapa apenas quando pronto (snapshotReady), tambem emite
event#onMapLoaded
. - iOS: Atualiza
GMSPolyline.path
sem recriar. Novo metodopolylines#updatePoints
. - Android: Atualiza pontos da polyline em lugar (
Polyline.setPoints
). Novo metodopolylines#updatePoints
. - Dart:
updatePolylinePoints(String id, List<LatLng>)
eonMapLoaded
noGoogleMapController
. - Markers: icones por URL decodificados fora da main-thread e redimensionados (~48dp). Ancora padrao agora (0.5, 0.62).
- Mapa estatico: novo
StaticMapView
com polyline (Google Static Maps), util no Windows/desktop. - Docs: README ampliado com exemplos e dicas de "snake" (decimacao + throttle 16–32ms, sem remover/adicionar a cada frame).
0.2.0 #
EN
- Navigation (Directions + Voice + Follow): new Dart helper with
MapNavigator.start(...)
andNavigationOptions
to fetch a Google Directions route, draw the polyline, follow the user with the camera, and speak step instructions (TTS). Includes simple re-route when off-route. - Camera: new
animateCamera(target, {zoom, tilt, bearing, durationMs})
method inGoogleMapController
(native Android/iOS updated). - Docs: README updated with navigation usage.
- Dependencies: added
http
,geolocator
,flutter_tts
(the app remains responsible for location permissions).
PT-BR
- Navegação (Rotas + Voz + Follow): novo helper em Dart com
MapNavigator.start(...)
eNavigationOptions
para buscar rota (Google Directions), desenhar a polyline, seguir a localização do usuário com a câmera e falar as instruções (TTS). Inclui re-roteamento simples ao sair da rota. - Câmera: novo método
animateCamera(target, {zoom, tilt, bearing, durationMs})
noGoogleMapController
(Android/iOS nativos atualizados). - Docs: README atualizado com uso de navegação.
- Dependências: adicionadas
http
,geolocator
,flutter_tts
(o app continua responsável por permissões de localização).
0.1.0 #
EN
- First release of the plugin.
GoogleMapView
widget withAndroidView
/UiKitView
.GoogleMapController
with: markers (add/update/remove/clear), polylines (add/remove/clear), camera (move/fit bounds), map style, traffic, myLocation, padding, snapshot.- Icon cache: LRU (Android) and NSCache (iOS) with async download.
- Functional example (
example/
) simulating a ride flow (pickup/dropoff/route/driver).
PT-BR
- Primeira versão do plugin.
- Widget
GoogleMapView
comAndroidView
/UiKitView
. GoogleMapController
com: markers (add/update/remove/clear), polylines (add/remove/clear), câmera (move/fit bounds), estilo de mapa, tráfego, myLocation, padding, snapshot.- Cache de ícones: LRU (Android) e NSCache (iOS), com download assíncrono.
- Exemplo funcional (
example/
) simulando fluxo de corrida (pickup/dropoff/rota/driver).