-
-
Notifications
You must be signed in to change notification settings - Fork 860
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] Covert LatLng to Point with map rotation in mind #1311
Comments
Whats your test case you are trying to do ? |
Hi |
Hi @mohammedX6, I have a better understanding now. The For example, use: MapOptions(
onTap: (screenPoint, _) {
print(screenPoint.relative);
print(screenPoint.global);
}
), Let me know if this works for you! |
@JaffaKetchup Thanks for response, I am using flutter_map_line_editor |
Maybe? There might be some weird anchoring going on, if you're using markers. |
no markers involved. |
Where are the red circle and blue circles supposed to be? |
the red circle must be in the same location as the blue circle. |
Not really sure in this case. The position from |
I think I might dig more into the code, Anyway thanks @JaffaKetchup . |
@ibrierley Hi, here is an issue I opened, |
ok, that isn't a minimal example. But in the meantime, WHY do you want latLngToPoint. Just checking you're not trying to reinvent the wheel. (I'm not suggesting at some point there shouldn't be a method for this..but trying to understand why firstly). For example, if you have a LatLng, why not just place a Marker there with any widget you want ? Does it need to be outside of FlutterMap or something ? |
@ibrierley YES that's exactly what i want. |
I suspect this isn't easily going to happen unless someone has a lot of time and/or been working on this already. I think there's probably too many variables that one can't be confident of and change when a rotation happens. Maybe someone will have a brainwave though! There's also the question of what space one wants the result in...in map widget space, in an outer widget space, or screen resolution space. So my interim suggestion would be either a) don't allow rotation in the app, or b) make sure everything is done in flutter_map layer coordinate space (eg as a marker widget, I would suspect this is easiest), or c) spend a lot of time hacking something together. |
Actually, this may be possible if we reverse the rotationPoint...and use a pre rotated pixel origin....something like...
Maybe a little messy, but I've run out of time though for today. |
@ibrierley MAN, THIS THING IS WORKING LIKE A CHARM !, |
Thanks for the feedback, I'll try and get a PR sorted this weekend for it (maybe with renaming the rotate functions so they're clearer), so it ends up in the main code. We don't have a Flutter_map donation thing yet (maybe that could be a discussion, not sure if we want to stay away from that or not). Normally devs will have a donation button on their respective repos though on Git if people feel flush tho ;). |
We probably should setup an overall donation thing. |
@ibrierley |
Trying to avoid spamming here, but I think you were using
https://github.com/ibrierley/flutter_map_line_editor and look halfway down.
…On Fri, Jul 29, 2022 at 12:06 PM Mohammed Aljezawi ***@***.***> wrote:
Thanks for the feedback, I'll try and get a PR sorted this weekend for it
(maybe with renaming the rotate functions so they're clearer), so it ends
up in the main code. We don't have a Flutter_map donation thing yet (maybe
that could be a discussion, not sure if we want to stay away from that or
not). Normally devs will have a donation button on their respective repos
though on Git if people feel flush tho ;).
@ibrierley <https://github.com/ibrierley>
I don't see a donation button on your page, Can you send Ko-fi or PayPal
donation link?
—
Reply to this email directly, view it on GitHub
<#1311 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5YN5MXN2STWZKGPTU4LCDVWO3KDANCNFSM5344UA6A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There's now a PR at #1325 if you wanted to test that. |
I am confirmed it's working. |
Fixed as of v2.2.0. Thanks for the report! |
What do you want implemented?
I want to covert a LatLng to point with taking care map rotation
minimal example of the problem I have https://filebin.net/t8uftfm4aklz69yx/minimal_example.zip
What other alternatives are available?
I tried this but the result is wrong
Can you provide any other information?
No response
Platforms Affected
Android, iOS
Severity
Obtrusive: No workarounds are available, and this is essential to me
Requirements
The text was updated successfully, but these errors were encountered: