flutter-mapbox-gl / maps

A Mapbox GL flutter package for creating custom maps
Other
1.04k stars 502 forks source link

The getter 'options' was called on null. #1226

Closed itsmelaxman closed 1 year ago

itsmelaxman commented 1 year ago

Hi, I've draw a circle in this map package and have been working perfectly before 1 week. Now its not working properly in my flutter app. I am using this method :

if (radius == null) mapController! .addCircle( CircleOptions( geometry: LatLng( position.latitude, position.longitude, ), circleRadius: value, circleColor: '#3399ff', circleOpacity: 0.2, draggable: true, ), ) .then( (value) => radius = value, ); mapController!.updateCircle( radius, CircleOptions( geometry: LatLng( position.latitude, position.longitude, ), circleRadius: value, circleColor: '#3399ff', circleOpacity: 0.2, ), );

Its giving me error: W/Choreographer(11512): Frame time is 0.282117 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase. W/PlatformViewsController(11512): Creating a virtual display of size: [1080, 2356] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1080, 2263]. W/TelemetryUtils(11512): java.lang.SecurityException: getDataNetworkTypeForSubscriber D/IS_CTS_MODE(11512): false D/MULTI_WINDOW_SWITCH_ENABLED(11512): false D/SurfaceView(11512): UPDATE null, mIsCastMode = false I/Mbgl-EGLConfigChooser(11512): In emulator: false W/Mbgl (11512): {GLThread 526}[Android]: MapRenderer::onSurfaceCreated GlyphsRasterizationMode was specified without providing LocalIdeographFontFamily. Switching glyphsRasterizationMode to NoGlyphsRasterizedLocally mode. W/Mbgl (11512): {GLThread 526}[ParseStyle]: Layer '4oK5Rg9gtn_0' has an invalid value for text-font and will not render text. Output values must be contained as literals within the expression. W/Mbgl (11512): {GLThread 526}[ParseStyle]: Layer '4oK5Rg9gtn_0' has an invalid value for text-font and will not render text. Output values must be contained as literals within the expression. W/Mbgl (11512): {GLThread 526}[ParseStyle]: Layer '4oK5Rg9gtn_0' has an invalid value for text-font and will not render text. Output values must be contained as literals within the expression. W/Mbgl (11512): {GLThread 526}[OpenGL]: The layer '4oK5Rg9gtn_0' uses more data-driven properties than some devices may support. Though it will render correctly on this device, it may have rendering errors on other devices. To ensure compatibility with all devices, use 2 fewer data-driven properties in this layer. E/flutter (11512): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: NoSuchMethodError: The getter 'options' was called on null. E/flutter (11512): Receiver: null E/flutter (11512): Tried calling: options E/flutter (11512): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5) E/flutter (11512): #1 MapboxMapController.updateCircle (package:mapbox_gl/src/controller.dart:841:29) E/flutter (11512): #2 _GpsScreenComponentState.build.<anonymous closure> (package:e_digital_nepal/screen/gps/student/gps_screen.dart:597:46) E/flutter (11512): <asynchronous suspension> E/flutter (11512): W/System (11512): A resource failed to call release.

flutter_01

flutter_02.pngflutter_01

Anyone here knows how can i fix this? (If it's possible to fix)

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.