Closed andreystavitsky closed 1 year ago
@andreystavitsky When will the updated edition be made available?
@nidhin579 you should address that question to @lpongetti . I hope he will find some time in the nearest future to look into that PR
@andreystavitsky I tried your ad29160 commit and noticed an issue (for me at least). I'm not sure which change of your caused it (perhaps removing PopupState()) but I am no longer able to get the proper runtimeType in the popupBuilder (ie. it only returns the extended class). I have two classes that extend Marker and I used to be able to display a different view based on the Class/Type but now it always returns the Type MakerNode (which is actually a custom class that implements Marker in the package). Example below : (else case always runs now)
I'm unsure if this is something your commit is introducing or perhaps occurred in an earlier update but I thought I'd share in case you had any insight.
Quick edit to mention that the correct runtimeType gets returned in onMarkerTap.
// debugPrint("MARKER TYPE: ${marker.runtimeType}");
if (marker is SyncedDataCollectionMarker) {
return MarkerSyncedCollectionSummaryPopup(
localSyncedDataTrip: marker.localSyncedDataTrip,
collection: marker.collection,
);
} else if (marker is SyncedDataTripMarker) {
return MarkerSyncedTrackplotPopup(
localSyncedDataTrip: marker.localSyncedDataTrip,
endMarker: marker.endMarker,
);
} else {
return const Card(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Text('Not a known marker type'),
));
}
},
@bmason8 did you tried flutter_map_marker_cluster for flutter_map v4?
@bmason8 did you tried flutter_map_marker_cluster for flutter_map v4?
@andreystavitsky which version of flutter_map_marker_cluster is that (v_1.1.1?)? I can't use the current v_1.1.1 because of it's dependency on latlong2 ^0.8.0. My project depends on latlong2 ^0.9.0. My project uses several mapping packages so it's a nightmare trying to update versions.
@bmason8 i think i've found an issue
@andreystavitsky I just tested your change (commit dee9902) and it fixed the issue for me. Thanks for your work on this, hopefully your pull request gets accepted soon.
@andreystavitsky Thanks... Good job!
can i use this like this ? flutter_map_marker_cluster: git: url: https://github.com/lpongetti/flutter_map_marker_cluster ref: dee990295b4ae2022fa3de89ba78944c3d5d83e2
Yes but with proper indentation.
Hi all,
I've tried dee9902 from @andreystavitsky which fixed one problem, but classically gives me another. I'm using the popupOptions and now that popupState is gone I get the following error:
Bad state: `PopupState.of()` called in a context with no PopupState. Consider using PopupScope to add a PopupState to the context
Any ideas? @bmason8 potentially you had a similar issue?
I feel like I'm missing something obvious following a long day...
@RedHappyLlama pleas elook at the example app clustering_page.dart line 187
body: PopupScope(
popupController: _popupController,
child: FlutterMap(
Thanks @andreystavitsky! I'd looked at the example but missed that! Long day... :).
Hello, do we have some update status on this PR ? It will increase the quality of my project by a high margin ! It's LGTM :)
@andreystavitsky When will the updated edition be made available?