josxha / flutter_map_plugins Goto Github PK
View Code? Open in Web Editor NEWThe source code for all sorts of flutter_map plugins.
Home Page: https://pub.dev/publishers/joscha-eckert.de/packages
The source code for all sorts of flutter_map plugins.
Home Page: https://pub.dev/publishers/joscha-eckert.de/packages
Hi There,
Can you give me any hint or suggestion on how to work and improve the rendering of the Map. Testing the sample app I can get it working but seems that the vector_map_tiles_pmtiles map is quite basic. Using ProvidedThemes.lightTheme() render like this:
Support for isar has been implemented into dio_cache_interceptor
in dio_cache_interceptor_isar_store.
Although flutter_map_cache
should already support the cache store, the documentation and example app should receive an update.
Hi! I'm new to Flutter so I am probably missing something, but I am trying to use FileSystem cache exactly as it is showing on this example, and it is showing a lot of the exceptions below every time the map loads:
════════ Exception caught by image resource service ════════════════════════════
DioException [request cancelled]: The request was cancelled.
It doesn't show any other detail, only those lines repeating multiple times. This is happening both with File System and In Memory cache, for Android and iOS simulators.
What could be the cause of this?
Thanks!
flutter_map_compass
MapCompass alignment not working
Add code MapCompass in FlutterMap
flutter doctor
[✓] Flutter (Channel stable, 3.19.5, on Ubuntu 22.04.4 LTS 5.15.0-101-generic, locale ru_RU.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.2)
[✓] Connected device (3 available)
[✓] Network resources
The compass is expected to be top left
But the compass on the top right
FlutterMap(
options: MapOptions(),
children: [
...
MapCompass(
icon: SvgPicture.asset(Const.IMAGE_COMPASS, height: sizeCompassMaker),
alignment: Alignment.topLeft,
),
],
),
android
Issue Description
I encountered a DioException with the message [request cancelled]: The request was cancelled while making HTTP requests using the Dio library.
Code Snippet
Here's the code snippet where the issue occurs:
@internal
static Future<T> listenCancelForAsyncTask<T>(
CancelToken? cancelToken,
Future<T> future,
) {
return Future.any([
if (cancelToken != null) cancelToken.whenCancel.then((e) => throw e),
future,
]);
}
Error Message
DioException (DioException [request cancelled]: The request was cancelled.)
Steps Taken to Resolve
Cleaned and rebuilt the project
Ensured all dependencies are up to date
None of these steps resolved the issue.
Additional Information
Dio Version: (Please provide the version of Dio you are using)
Flutter Version: (Please provide the version of Flutter you are using)
Operating Environment: (e.g., Android, iOS, Web)
Does anyone know how to resolve this issue? Thank you!
The next version of flutter_map is coming soon, with breaking changes for all users and plugins!
Expected CHANGELOG: https://github.com/fleaflet/flutter_map/blob/release-prep/CHANGELOG.md
Likely to be merged PR with significant impacts: fleaflet/flutter_map#1615
Release prep PR: fleaflet/flutter_map#1632
New documentation (path liable to change): https://docs.fleaflet.dev/v/v6-1
Expected migration instructions, suitable for most users: https://docs.fleaflet.dev/v/v6-1/getting-started/migrating-to-v6
List of commits since v5 (more to come): fleaflet/flutter_map@v5.0.0...master
Some map providers give me such an exception, while the images eventually load successfully.
Exception throws (package:flutter_map_cache/src/cached_image_provider.dart:84:13)
UPD. I logged onReceiveProgress: (count, total)
event and it seems that total
is -1 for some reason.
E/flutter (21781): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (21781): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (21781): #2 new ImageChunkEvent (package:flutter/src/painting/image_stream.dart:272:15)
E/flutter (21781): #3 CachedImageProvider._loadAsync.<anonymous closure> (package:flutter_map_cache/src/cached_image_provider.dart:84:13)
E/flutter (21781): #4 SyncTransformer.transformResponse.<anonymous closure> (package:dio/src/transformers/sync_transformer.dart:82:36)
E/flutter (21781): #5 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (21781): #6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (21781): #7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (21781): #8 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
E/flutter (21781): #9 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
E/flutter (21781): #10 IOHttpClientAdapter._fetch.<anonymous closure> (package:dio/src/adapters/io_adapter.dart:242:18)
E/flutter (21781): #11 _HandlerEventSink.add (dart:async/stream_transformers.dart:209:17)
E/flutter (21781): #12 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
E/flutter (21781): #13 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (21781): #14 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (21781): #15 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (21781): #16 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
E/flutter (21781): #17 _HandleErrorStream._handleData (dart:async/stream_pipe.dart:253:10)
E/flutter (21781): #18 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
E/flutter (21781): #19 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (21781): #20 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (21781): #21 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (21781): #22 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
E/flutter (21781): #23 _StreamController._add (dart:async/stream_controller.dart:658:7)
E/flutter (21781): #24 _StreamController.add (dart:async/stream_controller.dart:606:5)
E/flutter (21781): #25 _HttpParser._doParse (dart:_http/http_parser.dart:829:28)
E/flutter (21781): #26 _HttpParser._parse (dart:_http/http_parser.dart:319:7)
E/flutter (21781): #27 _HttpParser._onData (dart:_http/http_parser.dart:873:5)
E/flutter (21781): #28 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (21781): #29 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (21781): #30 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (21781): #31 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
E/flutter (21781): #32 _StreamController._add (dart:async/stream_controller.dart:658:7)
E/flutter (21781): #33 _StreamController.add (dart:async/stream_controller.dart:606:5)
E/flutter (21781): #34 _Socket._onData (dart:io-patch/socket_patch.dart:2447:41)
E/flutter (21781): #35 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (21781): #36 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (21781): #37 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (21781): #38 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
E/flutter (21781): #39 _StreamController._add (dart:async/stream_controller.dart:658:7)
E/flutter (21781): #40 _StreamController.add (dart:async/stream_controller.dart:606:5)
E/flutter (21781): #41 _RawSecureSocket._sendReadEvent (dart:io/secure_socket.dart:1114:19)
E/flutter (21781): #42 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter (21781): #43 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
E/flutter (21781): #44 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
E/flutter (21781): #45 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)```
each time I open my map, I have the following exception occurring multiple times :
flutter: core binding run 'package:flutter/src/painting/image_stream.dart': Failed assertion: line 268 pos 15: 'expectedTotalBytes == null || expectedTotalBytes >= 0': is not true.
flutter:
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2 new ImageChunkEvent (package:flutter/src/painting/image_stream.dart:268:15)
#3 CachedImageProvider._loadAsync.<anonymous closure> (package:flutter_map_cache/src/cached_image_provider.dart:84:13)
#4 SyncTransformer.transformResponse.<anonymous closure> (package:dio/src/transformers/sync_transformer.dart:82:36)
#5 _rootRunUnary (dart:async/zone.dart:1407:47)
#6 _CustomZone.runUnary (dart:async/zone.dart:1308:19)
#7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217:7)
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#10 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#11 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#12 IO<…>
VS Code has a bug where exceptions in async dart functions get caught even if they are actually handled.
The error message is:
DioException (DioException [request cancelled]: The request was cancelled.)
For more information about this issue see:
If you don't want the app to pause for those exceptions, you can uncheck the following debugger checkboxes:
With the CachedTileProvider
, the dio
options are overrode.
Due to the way the CachedTileProvider
constructor is written, the dioOptions
passed to the Dio()
constructor are not taken into account.
Indeed, if dioOptions
is null, the CachedTileProvider
body overrides the options with BaseOptions
flutter_map_mbtiles
sdfg
asdf
dsfg
dfg
// Paste your code here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.