Comments (10)
can you provide me more information and the steps to reproduce the problem
from osm_flutter.
now i figure out the problem,I will fix it and make the update
from osm_flutter.
try the new version 0.4.7+6
from osm_flutter.
Issue fixed, although did you remove the marker for current location? I cant see the marker previously there on current location!! How can I keep it?
from osm_flutter.
One more thing...
I put the OSMFlutter in Scaffold -> body and Flutter panicked with this stacktrace
Launching lib\main.dart on Mi Max 2 in debug mode...
lib\main.dart
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:55488/iBZCCvwwSQw=/ws
I/Gralloc2(10014): Adding additional valid usage bits: 0x200000
I/OsmDroid(10014): Using tile source: Mapnik
I/OsmDroid(10014): Tile cache increased from 0 to 9
E/osm (10014): osm flutter plugin start
E/osm (10014): osm flutter plugin resume
I/OsmDroid(10014): Tile cache increased from 9 to 15
�[38;5;248m════════ Exception caught by rendering library ═════════════════════════════════�[39;49m
�[38;5;244mThe following assertion was thrown during performLayout():�[39;49m
RenderStack object was given an infinite size during layout.
�[38;5;244mThis probably means that it is a render object that tries to be as big as possible, but it was put inside another render object that allows its children to pick their own size.�[39;49m
�[38;5;244mThe nearest ancestor providing an unbounded width constraint is: RenderStack#c8b05 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mThe nearest ancestor providing an unbounded height constraint is: RenderStack#c8b05 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mThe constraints that applied to the RenderStack were: BoxConstraints(unconstrained)�[39;49m
�[38;5;244mThe exact size it was given was: Size(Infinity, Infinity)�[39;49m
�[38;5;248mSee https://flutter.dev/docs/development/ui/layout/box-constraints for more information.�[39;49m
�[38;5;244mThe relevant error-causing widget was�[39;49m
�[38;5;248mStack�[39;49m
C:\…\src\osm_flutter.dart
�[38;5;244mWhen the exception was thrown, this was the stack�[39;49m
�[38;5;244m#0 RenderBox.debugAssertDoesMeetConstraints.<anonymous closure>�[39;49m
package:flutter/…/rendering/box.dart
�[38;5;244m#1 RenderBox.debugAssertDoesMeetConstraints�[39;49m
package:flutter/…/rendering/box.dart
�[38;5;244m#2 RenderBox.size=.<anonymous closure>�[39;49m
package:flutter/…/rendering/box.dart
�[38;5;244m#3 RenderBox.size=�[39;49m
package:flutter/…/rendering/box.dart
�[38;5;244m#4 RenderStack.performLayout�[39;49m
package:flutter/…/rendering/stack.dart
�[38;5;244m...�[39;49m
�[38;5;244mThe following RenderObject was being processed when the exception was fired: RenderStack#b047e relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT�[39;49m
�[38;5;244mRenderObject: RenderStack#b047e relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT�[39;49m
�[38;5;244mparentData: top=-100.0; offset=Offset(0.0, 0.0) (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(unconstrained)�[39;49m
�[38;5;244msize: Size(Infinity, Infinity)�[39;49m
�[38;5;244malignment: AlignmentDirectional.topStart�[39;49m
�[38;5;244mtextDirection: ltr�[39;49m
�[38;5;244mfit: loose�[39;49m
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m
I/flutter (10014): after layout
And I commented the Road detailing, Marker detailing etc. And then kept drawRoad using floating action button but crashed with this stacktrace
I/1.raster(10014): type=1400 audit(0.0:2642): avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 ioctlcmd=933 scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
I/OsmDroid(10014): Tile cache increased from 15 to 16
I/OsmDroid(10014): Tile cache increased from 16 to 20
I/xample.tripspa(10014): NativeAlloc concurrent copying GC freed 127495(5MB) AllocSpace objects, 206(4MB) LOS objects, 78% free, 3MB/15MB, paused 9.555ms total 101.028ms
I/1.raster(10014): type=1400 audit(0.0:2659): avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 ioctlcmd=933 scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
I/1.raster(10014): type=1400 audit(0.0:2679): avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 ioctlcmd=933 scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
I/xample.tripspa(10014): Background concurrent copying GC freed 96445(5MB) AllocSpace objects, 296(7MB) LOS objects, 77% free, 3MB/15MB, paused 320us total 127.201ms
I/1.raster(10014): type=1400 audit(0.0:2697): avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 ioctlcmd=94a scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
D/BONUSPACK(10014): OSRMRoadManager.getRoads:https://router.project-osrm.org/route/v1/driving/8.4360900000,47.3538700000;8.6136000000,47.4371000000?alternatives=false&overview=full&steps=true
W/xample.tripspa(10014): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
W/xample.tripspa(10014): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
I/1.raster(10014): type=1400 audit(0.0:2750): avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 ioctlcmd=945 scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
I/1.raster(10014): type=1400 audit(0.0:2751): avc: denied { read write } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14202 scontext=u:r:untrusted_app:s0:c76,c257,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
D/BONUSPACK(10014): OSRMRoadManager.getRoads - finished
E/AndroidRuntime(10014): FATAL EXCEPTION: DefaultDispatcher-worker-1
E/AndroidRuntime(10014): Process: com.example.tripspal, PID: 10014
E/AndroidRuntime(10014): kotlin.UninitializedPropertyAccessException: lateinit property start has not been initialized
E/AndroidRuntime(10014): at hamza.dali.flutter_osm_plugin.FlutterRoad.getStart(FlutterRoad.kt:15)
E/AndroidRuntime(10014): at hamza.dali.flutter_osm_plugin.FlutterOsmView$drawRoad$$inlined$let$lambda$1$2.invokeSuspend(FlutterOsmView.kt:414)
E/AndroidRuntime(10014): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(10014): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime(10014): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(10014): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(10014): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime(10014): at android.app.ActivityThread.main(ActivityThread.java:6687)
E/AndroidRuntime(10014): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10014): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
E/AndroidRuntime(10014): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)
I/Process (10014): Sending signal. PID: 10014 SIG: 9
Lost connection to device.
Exited (sigterm)
Be advised that the drawRoad worked with your default snippet given on plugin page on pub.dev,but crashes when I have following snippet
Scaffold(
body: OSMFlutter(
key: osmKey, // defained a field in state class - works fine
currentLocation: false,
// road: Road(
// startIcon: MarkerIcon(
// icon: Icon(
// Icons.person,
// size: 64,
// color: Colors.brown,
// ),
// ),
// roadColor: Colors.yellowAccent,
// ),
// markerIcon: MarkerIcon(
// icon: Icon(
// Icons.person_pin_circle,
// color: Colors.blue,
// size: 56,
// ),
// ),
initPosition: GeoPoint(latitude: 58.35387, longitude: 12.43609),
),
floatingActionButton: FloatingActionButton(
onPressed: () async {
RoadInfo roadInfo = await osmKey.currentState.drawRoad(
GeoPoint(latitude: 47.35387, longitude: 8.43609),
GeoPoint(latitude: 47.4371, longitude: 8.6136));
print("${roadInfo.distance}km");
print("${roadInfo.duration}sec");
},
child: Icon(Icons.add_road_rounded),
),
);
from osm_flutter.
i fixed previous errors, i will check it and make update for it
from osm_flutter.
Yeah, previous errors fixed. Cheers with that.
from osm_flutter.
i fixed that probleme will be avalaible in 0.4.7+8
from osm_flutter.
A quick clearance of understanding. Is it feasible to use GetX observables (.obs) instead of ValueNotifiers? Could it possible optimize or ease the code readability in any way, in addition to the optimized reloading of code and in case exposure of those values to GetX library user!!
A good catch to use it as I had a good experience with it! Could help you expose better handler functions and track them as well with no tedious Constructors and closure passing a lot, not even GlobalKey.currentState.functions!! feels too lengthy and could be helpful to have observers and closures to auto-invoke on some events like taps, locations changes for at specific conditions only!! etc.
Could possibly have a extensibility to add more features to dynamic logic invocation over firm and robust framework of minimal flow of calls underneath, with no issue of errors and checks as those will be handled by the user, you would rather just invoke it whatsoever on map events using Futures/Streams. Maybe too generic but real helpful for open source map impls as so are not provided at best as it with the core.
I have used flutter_nearby (Google Nearby Connections API Wrapper for Flutter) and got the idea of this closure based invocations at most places!!
from osm_flutter.
I understood your point,it's look good idea to use GetX , i will start look at it,
from osm_flutter.
Related Issues (20)
- Fatal error on iOS drawing circle HOT 3
- iOS error - Multiple widgets used the same GlobalKey HOT 4
- background/foreground user position update HOT 1
- Linux platform support
- Map location always starts in USA- Washington then it moves to the location that I initialize with HOT 5
- OSMFlutter can't be used inside other widgets than fullscreen? HOT 5
- flutter_osm_web >=1.0.0-rc.3 depends on web ^0.5.1 HOT 3
- Tile provider with reversed coordinates HOT 6
- Disable OSMFLUTTER tap/drag HOT 10
- I can't move on my maps HOT 5
- How can show modal when I click on marker ? HOT 2
- Markers | when adding markers with different icon types at the same time, markers take only one icon type HOT 11
- Bug in map zoom more than 17 step IOS HOT 4
- Does FlutterOSM supports vector base tiles ? HOT 1
- Flutter launching in iOS emulator : No such module 'OSMFlutterFramework' HOT 24
- iOS: Doesn't load draw and markers HOT 4
- Is there a way to make drawn single or multi road dotted line? HOT 2
- Remove references to deprecated v1 Android embedding
- Get map scale HOT 1
- iOS: osm_flutter version 1.2.0 throws an error: Value of type 'OSMView' has no member 'disableTouch' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm_flutter.