- Notifications
You must be signed in to change notification settings - Fork73
A Flutter package to provide the native maps to Android/iOS
License
fluttercommunity/platform_maps_flutter
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A Flutter package that provides a native map to both Android and iOS devices.
The plugin relies on Flutter's mechanism for embedding Android and iOS views. As that mechanism is currently in a developers preview, this plugin should also be considered a developers preview.
This package combines thegoogle_maps_flutter plugin withapple_maps_flutter to create a cross platform implementation of native maps for Android/iOS.
| Android | iOS |
|---|---|
![]() | ![]() |
![]() | ![]() |
- Camera movement including bearing, heading, tilt (also animated)
- Markers, including custom marker images and Info windows
- Different map types
- Map manipulation, enable/disable gestures, show current location, show compass ...
You will have to add the keyPrivacy - Location When In Use Usage Description with the value of your usage description.
Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml:
<manifest ... <application ... <meta-dataandroid:name="com.google.android.geo.API_KEY"android:value="YOUR KEY HERE"/>
classHomePageextendsStatelessWidget {@overrideWidgetbuild(BuildContext context) {returnScaffold( body:PlatformMap( initialCameraPosition:CameraPosition( target:constLatLng(47.6,8.8796), zoom:16.0, ), markers:Set<Marker>.of( [Marker( markerId:MarkerId('marker_1'), position:LatLng(47.6,8.8796), consumeTapEvents:true, infoWindow:InfoWindow( title:'PlatformMarker', snippet:"Hi I'm a Platform Marker", ), onTap: () {print("Marker tapped"); }, ), ], ), myLocationEnabled:true, myLocationButtonEnabled:true, onTap: (location)=>print('onTap: $location'), onCameraMove: (cameraUpdate)=>print('onCameraMove: $cameraUpdate'), compassEnabled:true, onMapCreated: (controller) {Future.delayed(Duration(seconds:2)).then( (_) { controller.animateCamera(CameraUpdate.newCameraPosition(constCameraPosition( bearing:270.0, target:LatLng(51.5160895,-0.1294527), tilt:30.0, zoom:18, ), ), ); }, ); }, ), ); }}
Suggestions and PR's to make this plugin better are always welcome. Please notice that the features provided by this package depend on the apple_maps_flutter plugin, which will improve in the future.
About
A Flutter package to provide the native maps to Android/iOS
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.



