amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 346 forks source link

Pin jumps position when selected for drag (Android) #632

Open linda-dge opened 5 years ago

linda-dge commented 5 years ago

I have Version 3.2.0 from Nuget. Android 9.0 - API 28

Here is the pin. The icon is 90px by 90px and in the Assets directory.

_cloud = new Pin() { Type = PinType.Place, Icon = BitmapDescriptorFactory.FromBundle("cloud_icon.png"), Label = "Cloud", IsDraggable = true, Anchor = new Point(0.5, 0.5) };

I set the position of the pin to the device location.

It appears in the middle of the map perfectly.

pinstart

Then I hold to start drag and the pin jumps position. Continues to be in this position for all of drag.

pinstartdrag

It is like the anchor gets reset.

linda-dge commented 5 years ago

pin at initial position 37.4219983333333,-122.084 pin at drag start 37.447384065051,-122.0873304829

amay077 commented 5 years ago

This is specified behavior of Google Maps SDK for Android. I think it is pin escapes from finger for drag and drop.

linda-dge commented 5 years ago

What do I do about it? Is there a workaround?

Linda Rawson

On Sat, Jun 15, 2019 at 5:00 AM amay077 notifications@github.com wrote:

This is specified behavior of Google Maps SDK for Android. I think it is pin escapes from finger for drag and drop.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/632?email_source=notifications&email_token=AMCTXTDLSY6P2GWYL3BOCQDP2TDU7A5CNFSM4HYJZ6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYVXBA#issuecomment-502356868, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCTXTF47UU2P4CDYOZBRETP2TDU7ANCNFSM4HYJZ6RQ .

linda-dge commented 5 years ago

Here is the bug on google. https://issuetracker.google.com/issues/35824023

amay077 commented 5 years ago

I think it is not a bug. I agree to comment #6.

But I can consider how to inject pin position when marker drag starting according to comment #16.

linda-dge commented 5 years ago

That would be great!

linda-dge commented 5 years ago

BTW. You are awesome. You have done a great job with this library.

amay077 commented 5 years ago

Hi @linda-dge , How about iOS side? You feel "no problem" ?

linda-dge commented 5 years ago

I have not tried the iOS side. I am trying to get my application to work completely in Android and then work through the problems in iOS.

Linda Rawson

On Mon, Jun 24, 2019 at 8:33 AM amay077 notifications@github.com wrote:

Hi @linda-dge https://github.com/linda-dge , How about iOS side? You feel "no problem" ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/632?email_source=notifications&email_token=AMCTXTHYK2JSJJVAHBDNDDDP4DLJ5A5CNFSM4HYJZ6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYND5WI#issuecomment-505036505, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCTXTEKJ4KYQXXHYYVZCB3P4DLJ5ANCNFSM4HYJZ6RQ .

amay077 commented 5 years ago

Untitled7

This is iOS side's default behavior.

  1. Long tap Pin
  2. Pan to bottom automatically
  3. Drag to move pin position
  4. Release finder
  5. Pan to up automatically

Do you feel it? I can't disable pan automatically, also can't get pan distance.

linda-dge commented 5 years ago

Do you agree they both are terrible?

We probably just have to deal with it.

Linda Rawson

On Mon, Jun 24, 2019 at 8:42 AM amay077 notifications@github.com wrote:

[image: Untitled7] https://user-images.githubusercontent.com/401369/60027761-0526a880-96d9-11e9-990c-2235e5b5fc7d.gif

This is iOS side's default behavior.

  1. Long tap Pin
  2. Pan to bottom automatically
  3. Drag to move pin position
  4. Release finder
  5. Pan to up automatically

Do you feel it? I can't disable pan automatically, also can't get pan distance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/632?email_source=notifications&email_token=AMCTXTDC3YMRHYL4O4DUUUDP4DMMPA5CNFSM4HYJZ6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNE5IA#issuecomment-505040544, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCTXTEZ26XRTPHMOHBPRH3P4DMMPANCNFSM4HYJZ6RQ .

amay077 commented 5 years ago

Do you agree they both are terrible?

No, I think that it is not that big of a deal. But I can provide some solutions. For that you should write little tricky code.

linda-dge commented 5 years ago

You are the greatest.

Linda Rawson

On Mon, Jun 24, 2019 at 8:55 AM amay077 notifications@github.com wrote:

Do you agree they both are terrible?

No, I think that it is not that big of a deal. But I can provide some solutions. For that you should write little tricky code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/632?email_source=notifications&email_token=AMCTXTE3O2APANYES3ZR63TP4DN5DA5CNFSM4HYJZ6R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNGK5A#issuecomment-505046388, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCTXTEO5WUAINMGAQQ3Z2DP4DN5DANCNFSM4HYJZ6RQ .

BioNoob commented 4 years ago

Hi. Also have this problem. For mapzoom = 15, My fix code in pindragstart\end\dragging is int m = map.Pins.IndexOf(e.Pin); var l = map.Pins.Where(t => t.Label == e.Pin.Label).SingleOrDefault(); var p = new Xamarin.Forms.GoogleMaps.Position(e.Pin.Position.Latitude - (0.001347153801 * 0.5), e.Pin.Position.Longitude);

I try calculate this for other zoom, but still failed. do you have solution for this?