Comments (5)
Hi @deezaster, thanks for the interest in this plugin :).
Can you give me some more information about what is not working?
If you can give me a full example that I can run (or a link to a repo) it will be easier to help you out!
from flutter_map_marker_popup.
Everything works perfectly!
PopupMarkerLayerWidget(
options: PopupMarkerLayerOptions(
popupController: _popupLayerController,
markers: _markers,
markerRotateAlignment: PopupMarkerLayerOptions.rotationAlignmentFor(AnchorAlign.top),
popupBuilder: (_, Marker marker) {
if (marker is MapMarker) {
return MapPopup(markerData: marker.markerData);
}
return const SizedBox();
},
),
)
But I want to use the popup for the package flutter_map_tappable_polyline but don't know how.
Currently I am calling an AlertDialog (customized as MapPopupCorso, see HERE in the code). But this one is ugly and is only displayed centered. I would like to use your popup with exact positioning.
TappablePolylineLayerWidget(
options: TappablePolylineLayerOptions(
polylineCulling: false,
pointerDistanceTolerance: 20,
polylines: _mapPolylines,
onTap: (polylines, tapPosition) {
_popupLayerController.hideAllPopups();
/// === > HERE:
MapPopupCorso.show(context, polylines.map((polyline) => polyline.tag).join(','));
},
),
),
from flutter_map_marker_popup.
@deezaster Ah OK I think I understand now. So it looks like you have map markers with the working popup but you also want the popups to show when you tap on the polyline. If that's right then you need to have a mapping from the polyline to the marker (either stored in a Map
or perhaps it's possible to extend polyline to have it contain a reference to a marker) then just call _popupLayerController.showPopupsOnlyFor()
with the relevant marker.
from flutter_map_marker_popup.
Yeah, i did it! Thanks for the support and help.
from flutter_map_marker_popup.
Great I'm glad it works for you 🙂.
from flutter_map_marker_popup.
Related Issues (20)
- Popups not showing when definition is in layers: [] HOT 1
- MarkerTapBehavior.togglePopupAndHideRest doesnt work as expected HOT 3
- Feature Request: Show popups inside current window HOT 4
- How to adjust popup snap for map rotation HOT 1
- PopupMarkerLayerOptions.popupBuilder callback is called multiple times when marker is clicked HOT 3
- How to show popup programmatically? HOT 2
- Can't use along flutter_map ^4.0.0 HOT 1
- marker popup not above other markers HOT 3
- Update latlong2 to 0.9.0 HOT 10
- Conflicts with plugin flutter_map_location_marker HOT 2
- method to check whether popup is showing or not HOT 6
- Exception was thrown when I used multiple PopupMarkerLayers HOT 10
- Popup doesn't appears HOT 1
- is the a version of this plugin for flutter_map 5 not 6?
- FM v6 is coming soon HOT 3
- Import conflict for LatLngTween with flutter_map 6.0.1 HOT 1
- How to get a popup to follow a marker when it moves? HOT 4
- How to create Draggable PopupMarker HOT 1
- The app was built, but the map is not working. HOT 1
- Question: how this can be adapted to work with mapbox_maps_flutter? HOT 1
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 flutter_map_marker_popup.