Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Implement unbounded horizontal scroll #1582

Open
r0b3rth4ns3n opened this issue Jul 10, 2023 · 13 comments
Open

[FEATURE] Implement unbounded horizontal scroll #1582

r0b3rth4ns3n opened this issue Jul 10, 2023 · 13 comments
Labels
feature This issue requests a new feature Fund Open for a bounty with Polar.sh! P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality

Comments

@r0b3rth4ns3n
Copy link

r0b3rth4ns3n commented Jul 10, 2023

What do you want implemented?

i'm absolutely in love with flutter_map ;) thanks a lot for this awesome package !
however an option like worldCopyJump in leaflet would be quite essential to my use case :)
i've double-checked and it's the default behavior of most major mapping apps (e.g. google and apple)
it would be cool to recreate such a user experience with flutter_map ;)
#1201

What other alternatives are available?

No response

Can you provide any other information?

No response

Severity

Obtrusive: No workarounds are available, and this is essential to me

Bounty

flutter_map uses Polar.sh to provide a bounty on this issue! Contributors who resolve this issue will receive the full amount pledged below, after all fees have been paid.

The flutter_map team funds issues we want to see fixed but are relatively low priority for us, and we do this using your donations! When you donate, 15% goes to the OpenStreetMap Foundation, and the rest is held as donations, some of which we fund these issues with!

Of course, we appriciate any size donation you can make: it supports us directly, and allows us to fund these issues, but if this issue is particularly important to you, you can pledge money directly to this issue using the button below.


Fund with Polar
@r0b3rth4ns3n r0b3rth4ns3n added feature This issue requests a new feature P: 3 (low) (Default priority for feature requests) labels Jul 10, 2023
@JaffaKetchup JaffaKetchup changed the title [FEATURE] infinite horizontal scroll [FEATURE] Implement unbounded horizontal scroll Jul 10, 2023
@JaffaKetchup
Copy link
Member

Hi @r0b3rth4ns3n, thanks for your interest!
At the moment, I think this depends on #1452, which is marked as P4 due to its low-ish demand and due to the fact it won't immediately lead to any new functionality.

@JaffaKetchup JaffaKetchup added P: 4 (far future) and removed P: 3 (low) (Default priority for feature requests) labels Jul 10, 2023
@ibrierley
Copy link
Collaborator

Hmm I'm not entirely sure it does, if I'm reading that one right. The LatLngs would still be the same wouldn't they ?

My thinking is probably more like that a custom crs would need to be used, and the infinite flag set to true, but I doubt that code fully works, but it would probably be my first port of call when examining...

However,as ever the devil is in the detail. Let's say you have a marker in London and stretch the map and London is displayed twice (or is there a limit to only display one full map) I.e Google seems to have a fixed limit so is infinite, but not duplicated, i.e you can't have 2 Londons displayed.. leaflet.js I think you can have 2 Londons displayed (i.e at https://leafletjs.com/examples/quick-start/ ) but then it only displays one set of markers, so as you scroll horizontally you actually lose your marker. Or should it be more like https://fluttermap.dabbles.info/geoslicer/#/ which isn't infinite, but will duplicate as it stretches out...

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Jul 10, 2023

I guess it depends on how we treat it.
If we keep the current LatLng, we limit to +/- 180deg. I guess this means any taps in the non-standard 'region' will be redirected to taps in the standard region? Ie. Trying to place a new marker at the tap position would place the marker in the corresponding tap position on the standard region.
Not really sure though. Just basing this off behaviour I've seen elsewhere.

@r0b3rth4ns3n
Copy link
Author

in case someone else is looking for this feature right now
both #1452 and #468 mention possible albeit undesirable workarounds

@ibrierley
Copy link
Collaborator

Yeah, this is why it's one of those that sounds simple and fine in theory until its broken down.

Fwiw I feel like Googles feels the most intuitive. I.e limit the size to only one world, but allow scrolling to the same map/markers wrapped around. Leaflet feels incorrect, allows infinite scrolling, but then you're kind of on a separate map not showing the existing markers which feels confusing.

@r0b3rth4ns3n
Copy link
Author

i agree with @ibrierley
the user experience of google maps seems most intuitive

@r0b3rth4ns3n
Copy link
Author

imho hitting a wall at "the edge of the world" as with the current behavior of flutter_map seems most undesirable in terms of user experience and plays into flat earthers hands ;)

@jbdtky
Copy link

jbdtky commented Oct 10, 2023

I believe it's a very important feature for any person using a map in a app. It's a feature that definitely need ASAP. So happy to contribute if needed.

@JaffaKetchup
Copy link
Member

We're very happy to accept PRs, but it's likely going to be a big job!

@jbdtky
Copy link

jbdtky commented Oct 10, 2023

I need it for my product: https://www.dokoni.app. Or maybe should I use something else, any recommendation?

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Oct 10, 2023

Personally, I'm a massive supporter of OSS and not locking in to massive corporations. Aware I'm using GitHub 😂

On a serious note, the only other real alternatives are mapbox_gl and Google. But you've probably looked into those already. For flexibility and ecosystem, FM really is the leader atm. Check the home page of the docs for a small comparison - but TLDR, they only really win in performance (although, you won't notice a difference unless you're layering like 50000 markers features, and they keep it performant by cheating and not using Dart) and cost in some cases, as they often use charge by load instead of tile and sometimes have preferable pricing (but be aware of lock-in).

@JaffaKetchup JaffaKetchup added the S: core Scoped to the core flutter_map functionality label Dec 10, 2023
@noforeignland
Copy link

noforeignland commented Apr 13, 2024

Any update on this? I'm looking at the viability of using FM in an app that allows users to pan around in the Pacific (and the rest of the world) and it's really not intuitive for them to have to scroll the "wrong" way around the world when they reach the anti-meridian. Thx.

@JaffaKetchup
Copy link
Member

As pointed out in #1750 (comment), the latest version of latlong2 has removed constraints on the latlong.

This means we can do something suggested by @josxha somewhere else, which I now can't find, which is to use an inner widget which repeats and represents a specific range of coords, and change all the necessary methods to return a list of coords rather than a single one, all which could be on screen (which would then be handled by the widget).

As stated (I believe by @ibrierley somewhere else, which I now can't find), the best behaviour would probably be to have each 'world instance' be identical, so a marker at 0,0 appears at 0,0 in all world instances.

I'm not sure where the best place to start this would be, if my description made sense, and whether I've missed anything :D

@JaffaKetchup JaffaKetchup added P: 3 (low) (Default priority for feature requests) and removed P: 4 (far future) labels Apr 25, 2024
@JaffaKetchup JaffaKetchup added the Fund Open for a bounty with Polar.sh! label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue requests a new feature Fund Open for a bounty with Polar.sh! P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Projects
Status: To do
Development

No branches or pull requests

5 participants