Moved to https://github.com/tobrun/flutter-mapbox-gl

Overview

Please note that this project has moved. Please head to https://github.com/tobrun/flutter-mapbox-gl for updates.


Flutter Mapbox GL Native

This Flutter plugin for mapbox-gl-native enables embedded interactive and customizable vector maps inside of a Flutter widget. This project plugin is in early development stage. Only Android is supported for now.

screenshot.png

Getting Started

Android

Following examples use Mapbox vector tiles, which require a Mapbox account and a Mapbox access token. Obtain a free access token on your Mapbox account page. After you get the key, place it in project's Android directory:

  • Create a local.properties file with the following path: $project_dir/android/local.properties
  • Add mapbox.accessToken="YOUR MAPBOX ACCESS TOKEN" token to the local.properties file.

Demo app

  • Install Flutter and validate its installation with flutter doctor
  • Clone this repository with git clone [email protected]:mapbox/flutter-mapbox-gl.git
  • Run the app with cd flutter_mapbox/example && flutter run

New project

  • Create new Flutter project in your IDE or via terminal
  • Add mapbox_gl: ^0.0.1 dependency to pubspec.yaml file and get the package
  • Add Mapbox read token value in the application manifest android/app/src/main/AndroidManifest.xml:
<manifest ...
  <application ...
    <meta-data android:name="com.mapbox.token" android:value="YOUR_TOKEN_HERE" />
  • Import Mapbox widgets and add them to your widget tree
import 'package:mapbox_gl/mapbox_gl.dart';

Documentation

This README file currently houses all of the documentation for this Flutter project. Please visit mapbox.com/android-docs if you'd like more information about the Mapbox Maps SDK for Android and mapbox.com/ios-sdk for more information about the Mapbox Maps SDK for iOS.

Getting Help

  • Need help with your code?: Look for previous questions on the #mapbox tag — or ask a new question.
  • Have a bug to report? Open an issue. If possible, include a full log and information which shows the issue.
  • Have a feature request? Open an issue. Tell us what the feature should do and why you want the feature.

Sample code

This repository's example library is currently the best place for you to find reference code for this project.

Contributing

We welcome contributions to this repository!

If you're interested in helping build this Mapbox/Flutter integration, please read the contribution guide to learn how to get started.

Comments
  • iOS integration

    iOS integration

    Atm this repository only supports running flutter-mapbox-gl on Android, to be able to publish this a flutter package we need to support both platforms.

    iOS 
    opened by tobrun 10
  • Using flutter's Android View: a rewrite is needed!

    Using flutter's Android View: a rewrite is needed!

    opened by RNMBuser 7
  • Add marker api

    Add marker api

    @tobrun I have tried to add the addMarker capability (without custom icon to start) but seeing an Java exception:

    E/MethodChannel#com.mapbox/flutter_mapbox(14564): Failed to handle method call
    E/MethodChannel#com.mapbox/flutter_mapbox(14564): java.lang.NullPointerException
    E/MethodChannel#com.mapbox/flutter_mapbox(14564): 	at com.mapbox.mapboxsdk.maps.NativeMapView.nativeAddMarkers(Native Method)
    E/MethodChannel#com.mapbox/flutter_mapbox(14564): 	at com.mapbox.mapboxsdk.maps.NativeMapView.addMarker(NativeMapView.java:406)
    

    This looks like an upstream problem as the Marker object is correct. can you have a look? https://github.com/seddonm1/flutter-mapbox-gl/tree/add-marker

    flutter feature 
    opened by seddonm1 7
  • Refactor public api and map state

    Refactor public api and map state

    This PR refactors the public api to be invoked directly on map_view.dart

    eg
                      mapView.zoom(12.0, 1000.0, 100.0, 5000);
                      // vs
                      mapView.map.zoom(textureId, 12.0, 1000.0, 100.0, 5000);
    

    This change also allow to refactor out textureId and adding a getter to the MapState to returning the active texture id at the moment of invoking plugin code.

    cc @tribui @seddonm1

    flutter 
    opened by tobrun 7
  • Markers not showing up.

    Markers not showing up.

    I have tried to add markers using the default marker icon. I don't get any errors, but the markers do not show up. Below is my code.

    FlutterMap flutterMap = maps.get(textureId).map; IconFactory iconFactory = IconFactory.getInstance(activity); Icon markerIcon = iconFactory.iconFactory.defaultMarker(); Marker marker = new MarkerOptions() .position(new LatLng(lat, lng)) .title(title) .snippet(snippet) .icon(markerIcon) .getMarker(); long markerId = flutterMap.addMarker(marker);

    opened by tomialagbe 4
  • Add onTap, queryRenderedFeatures, and remove boilerplate

    Add onTap, queryRenderedFeatures, and remove boilerplate

    Now it's possible to query the map, using:

          onTap: (coordinates, offset) async {
            (List<dynamic> geoJson = await controller
                .queryRenderedFeatures(offset, layersToSearch, null);
          },
    

    I refracted onMethodCall in MapboxPlugin.java to make it shorter and easier to understand.

    Corrected some errors regarding device pixel ratio.

    opened by yoavrofe 3
  • Error when using in a new project

    Error when using in a new project

    After adding the Mapbox imports on MainActivity.java that are missing in the Getting Started guide

    import com.mapbox.mapboxsdk.*;
    import com.mapbox.mapboxsdk.maps.*;
    import com.mapbox.mapboxsdk.maps.*;
    import com.mapbox.mapboxsdk.camera.*;
    import com.mapbox.mapboxsdk.geometry.*;
    import com.mapbox.mapboxsdk.constants.*;
    import com.mapbox.mapboxsdk.annotations.*;
    

    I still get the following error:

    Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
    A problem occurred starting process 'command '/Users/[username]/Library/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin/mips64el-linux-android-strip''
    
    opened by RNMBuser 3
  • TextureView vs. GLSurfaceView - orientation change

    TextureView vs. GLSurfaceView - orientation change

    First of all I would like to say thanks to @yoavrofe for the last commit (https://github.com/mapbox/flutter-mapbox-gl/pull/71). I am pretty sure using platformview is the correct way.

    While testing I realized mapbox crashes after rotation change.

    It can be prevented by using TextureView instead of GLSurfaceView:

    MapboxMapOptions mbmo = new MapboxMapOptions(); mbmo.textureMode(true); mapView = new MapView(context, mbmo);

    Crash log:

    D/EGL_emulation( 5197): eglCreateContext: 0xe0005360: maj 2 min 0 rcv 2 F/mapboxglexampl( 5197): java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: thread Thread[14,tid=5273,Native,Thread*=0xdfd46600,peer=0x1310a568,"GLThread 363"] using JNIEnv* from thread Thread[23,tid=5243,Runnable,Thread*=0xcb617800,peer=0x0," F/mapboxglexampl( 5197): java_vm_ext.cc:542] in call to DeleteGlobalRef F/mapboxglexampl( 5197): java_vm_ext.cc:542] from void com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeOnSurfaceCreated() F/mapboxglexampl( 5197): java_vm_ext.cc:542] "GLThread 363" prio=5 tid=14 Runnable F/mapboxglexampl( 5197): java_vm_ext.cc:542] | group="main" sCount=0 dsCount=0 flags=0 obj=0x1310a568 self=0xdfd46600 F/mapboxglexampl( 5197): java_vm_ext.cc:542] | sysTid=5273 nice=0 cgrp=default sched=0/0 handle=0xc8e7f970 F/mapboxglexampl( 5197): java_vm_ext.cc:542] | state=R schedstat=( 6355962 778233 50 ) utm=0 stm=0 core=2 HZ=100 F/mapboxglexampl( 5197): java_vm_ext.cc:542] | stack=0xc8d7c000-0xc8d7e000 stackSize=1042KB F/mapboxglexampl( 5197): java_vm_ext.cc:542] | held mutexes= "mutator lock"(shared held) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #00 pc 004152f6 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+198) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #01 pc 0051048e /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+382) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #02 pc 0050b743 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+83) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #03 pc 0031a8b0 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1088) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #04 pc 0031ad21 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, char*)+113) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #05 pc 000d60f7 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+71) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #06 pc 000d46fc /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+364) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #07 pc 000d3bdb /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+811) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #08 pc 000d7876 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::DeleteRef(char const*, _JNIEnv*, _jobject*, art::IndirectRefKind)+918) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #09 pc 000c034b /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::DeleteGlobalRef(_JNIEnv*, _jobject*)+43) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #10 pc 00024800 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #11 pc 00025f9b /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #12 pc 00025fe3 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #13 pc 00113407 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #14 pc 0008a885 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #15 pc 0008a8cf /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #16 pc 00086f82 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #17 pc 00065829 /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/lib/x86/libmapbox-gl.so (???) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #18 pc 005f6b97 /system/lib/libart.so (art_quick_generic_jni_trampoline+71) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #19 pc 005f0b82 /system/lib/libart.so (art_quick_invoke_stub+338) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #20 pc 000a30ce /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #21 pc 0029bca2 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+338) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #22 pc 00293e48 /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1048) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #23 pc 005bda66 /system/lib/libart.so (MterpInvokeDirect+342) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #24 pc 005e2e21 /system/lib/libart.so (ExecuteMterpImpl+14497) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #25 pc 00198dd0 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/base.apk (deleted) (com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onSurfaceCreated) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #26 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #27 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #28 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #29 pc 005bcb1e /system/lib/libart.so (MterpInvokeSuper+1374) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #30 pc 005e2da1 /system/lib/libart.so (ExecuteMterpImpl+14369) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #31 pc 001999f8 /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/base.apk (deleted) (com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onSurfaceCreated) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #32 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #33 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #34 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #35 pc 005bcb1e /system/lib/libart.so (MterpInvokeSuper+1374) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #36 pc 005e2da1 /system/lib/libart.so (ExecuteMterpImpl+14369) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #37 pc 0018f2da /dev/ashmem/dalvik-classes.dex extracted in memory from /data/app/com.mapbox.mapboxglexample-ZWRbu4E5v47YrcHxFSnE2Q==/base.apk (deleted) (com.mapbox.mapboxsdk.maps.MapView$5.onSurfaceCreated+10) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #38 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #39 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #40 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #41 pc 005bd574 /system/lib/libart.so (MterpInvokeInterface+1444) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #42 pc 005e2f21 /system/lib/libart.so (ExecuteMterpImpl+14753) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #43 pc 00ad5566 /system/framework/boot-framework.vdex (android.opengl.GLSurfaceView$GLThread.guardedRun+900) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #44 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #45 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+220) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #46 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1019) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #47 pc 005bda66 /system/lib/libart.so (MterpInvokeDirect+342) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #48 pc 005e2e21 /system/lib/libart.so (ExecuteMterpImpl+14497) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #49 pc 00ad5b00 /system/framework/boot-framework.vdex (android.opengl.GLSurfaceView$GLThread.run+48) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #50 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #51 pc 0026c68e /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+126) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #52 pc 005a953d /system/lib/libart.so (artQuickToInterpreterBridge+1277) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #53 pc 005f6c6d /system/lib/libart.so (art_quick_to_interpreter_bridge+77) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #54 pc 005f0b82 /system/lib/libart.so (art_quick_invoke_stub+338) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #55 pc 000a30ce /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+222) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #56 pc 004d3349 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #57 pc 004d45f7 /system/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+471) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #58 pc 0050958c /system/lib/libart.so (art::Thread::CreateCallback(void*)+1484) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #59 pc 0008f005 /system/lib/libc.so (__pthread_start(void*)+53) F/mapboxglexampl( 5197): java_vm_ext.cc:542] native: #60 pc 000247fb /system/lib/libc.so (__start_thread+75) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.nativeOnSurfaceCreated(Native method) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onSurfaceCreated(MapRenderer.java:63) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onSurfaceCreated(GLSurfaceViewMapRenderer.java:48) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at com.mapbox.mapboxsdk.maps.MapView$5.onSurfaceCreated(MapView.java:316) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1539) F/mapboxglexampl( 5197): java_vm_ext.cc:542] at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270) F/mapboxglexampl( 5197): java_vm_ext.cc:542]

    opened by moodstubos 2
  • Clicking the info icon crashes app

    Clicking the info icon crashes app

    Crashes with following stacktrace:

    E/AndroidRuntime( 2088): Process: com.mapbox.mapboxglexample, PID: 2088
    E/AndroidRuntime( 2088): java.lang.ClassCastException: $Proxy1 cannot be cast to android.view.WindowManagerImpl
    E/AndroidRuntime( 2088): 	at android.view.Window.setWindowManager(Window.java:770)
    E/AndroidRuntime( 2088): 	at android.view.Window.setWindowManager(Window.java:751)
    E/AndroidRuntime( 2088): 	at android.app.Dialog.<init>(Dialog.java:220)
    E/AndroidRuntime( 2088): 	at android.app.AlertDialog.<init>(AlertDialog.java:201)
    E/AndroidRuntime( 2088): 	at android.app.AlertDialog$Builder.create(AlertDialog.java:1107)
    E/AndroidRuntime( 2088): 	at android.app.AlertDialog$Builder.show(AlertDialog.java:1134)
    E/AndroidRuntime( 2088): 	at com.mapbox.mapboxsdk.maps.AttributionDialogManager.showAttributionDialog(AttributionDialogManager.java:73)
    E/AndroidRuntime( 2088): 	at com.mapbox.mapboxsdk.maps.AttributionDialogManager.onClick(AttributionDialogManager.java:65)
    E/AndroidRuntime( 2088): 	at com.mapbox.mapboxsdk.maps.MapView$AttributionClickListener.onClick(MapView.java:1744)
    E/AndroidRuntime( 2088): 	at android.view.View.performClick(View.java:6877)
    E/AndroidRuntime( 2088): 	at android.view.View$PerformClick.run(View.java:26069)
    E/AndroidRuntime( 2088): 	at android.os.Handler.handleCallback(Handler.java:789)
    E/AndroidRuntime( 2088): 	at android.os.Handler.dispatchMessage(Handler.java:98)
    E/AndroidRuntime( 2088): 	at android.os.Looper.loop(Looper.java:164)
    E/AndroidRuntime( 2088): 	at android.app.ActivityThread.main(ActivityThread.java:6938)
    E/AndroidRuntime( 2088): 	at java.lang.reflect.Method.invoke(Native Method)
    E/AndroidRuntime( 2088): 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
    E/AndroidRuntime( 2088): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
    
    opened by tobrun 2
  • change to Platform View, add user location, simpler token

    change to Platform View, add user location, simpler token

    This is a re-implementation of the Flutter plugin using Android Platform View. This is the path Google has taken with the Webview plugin, as well as their map plugin. The performance is good, and it's east to show the user location.

    iOS is not implemented in this PR, but is quite easy to implement. An example is this Implementation of the plugin by Fontinalis, which is based on the Google Maps plugin.

    I believe this basic plugin can be extended to provide full support of the Mapbox GL Native map.

    Since Flutter will soon support the web as well, using HummingBird, I think it will be a good idea to have the controller methods stay as close as possible to the Mapbox GL JS component.

    opened by yoavrofe 2
  • Locations and Markers

    Locations and Markers

    Hi, I love mapbox and I love flutter, but for now this binder is still insufficient for our needs. Are you planning to add support for locationComponent and markers?

    opened by polly3223 2
  • Archive repository

    Archive repository

    We are moving this project to be a OS community driven project. We need to update the documentation / repo description to point to this new repository and archive this repository.

    cc @zugaldia

    opened by tobrun 4
Owner
Mapbox
Mapbox is the location data platform for mobile and web applications. We're changing the way people move around cities and explore our world.
Mapbox
Mapbox-flutter - A repository to demonstrate the use of Mapbox - it's Maps and Navigation SDKs in a Flutter application

MapBox Flutter This repository contains code corresponding to the Youtube video

AB Satyaprakash 39 Dec 30, 2022
A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

Boris Gautier 5 Sep 14, 2022
A Mapbox GL flutter package for creating custom maps

Flutter Mapbox GL Please note that this project is community driven and is not an official Mapbox product. We welcome feedback and contributions. This

flutter-mapbox-gl 917 Dec 31, 2022
A Flutter package for place search using MapBox Api and for Static map image

About This package provides easy api calls to MapBox Search API. Also, it contains an static map image generator ?? . Maki Icons can be used now in ma

Ketan Choyal 63 Dec 2, 2022
MapBox Search Widget

About This package provides some widgets to use in conjunction to mapbox_search library. Also, it contains an static map image generator ?? . Installi

Ketan Choyal 7 Apr 20, 2021
Flutter Community - A central place for community made Flutter content.

Flutter Community A central place for community made Flutter content. The Flutter Community is an organization aimed at providing a central place for

Flutter Community 1.3k Jan 1, 2023
Flutter Maps A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Salsabil Mohamed Hemada 1 Jul 15, 2022
A flutter plugin for Google Maps

IMPORTANT: This plugin is no longer under development Why? We initially built this plugin to fill an early gap in flutter. Since then, Google has made

AppTree Software, Inc 415 Dec 29, 2022
Flutter plugin for forward and reverse geocoding

geocoder Forward and reverse geocoding. Usage Import package:geocoder/geocoder.dart, and use the Geocoder.local to access geocoding services provided

Aloïs Deniel 177 Dec 31, 2022
A flutter package for select a city from svg map.

City Picker From Map A flutter package for select a city from svg map. Supported countries (+150) are here. Screenshots Getting Started In the pubspec

Ahmet ÇELİK 49 Nov 17, 2022
Flutter Google Maps Tutorial

Flutter Google Maps Tutorial YouTube Video Setup Get an API Key at https://cloud.google.com/maps-platform/ Enable Maps SDK for Android, Maps SDK for i

Marcus Ng 85 Nov 30, 2022
Flutter Tutorial - Google Map with Live Location Tracking

Flutter Tutorial - Google Map with Live Location Tracking Build Google Map app with Live Location Tracking in Flutter. ✌   App Preview Android Preview

Samuel Adekunle 10 Dec 22, 2022
Map Picker for Flutter

Map Pin Picker A Vendor-free map Library for Easy and Quick Usage. Follow the steps to integrate Google Maps (https://pub.dev/packages/google_maps_flu

Akbar 16 Jul 15, 2022
This project was developed in Flutter for the challenge of mapping space trash in real-time proposed by NASA Space Apps Challenge.

This project was developed in Flutter for the challenge of mapping space trash in real-time proposed by NASA Space Apps Challenge.

Kauê Martins 1 Oct 3, 2021
Flutter Google Map Example - Day 41

Flutter Google Map Example - Day 41 class Afgprogrammer extends Flutter100DaysOfCode { video() { return { "title": "Flutter Google Map Exa

Mohammad Rahmani 74 Jan 3, 2023
A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Youhaan bootwala 1 Mar 18, 2022
Flutter plugin to display a simple flat world map with animated points in real time

Flutter Simple Map Flutter plugin to display a simple flat world map with animated points in real time. Can be used as a presentation of online users,

Vladyslav Korniienko 7 Dec 8, 2022
A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Varun CN 2 Apr 19, 2022
A Flutter package for iOS and Android for picking location and images.

location and image picker package for Flutter A Flutter package for iOS and Android for picking location and images. Demo Installation First, add loca

sk shamimul islam 9 Sep 28, 2022