fivenine-zurich / UnifiedMaps

A platform independent map implementation for Xamarin.Forms
MIT License
35 stars 12 forks source link

Move a PIN on the map #97

Open manmohan006 opened 6 years ago

manmohan006 commented 6 years ago

Is there a way to move an existing PIN on the map to a new position? Initially when I open the map, I have a bunch of PINs created, but I would like to update the position of these PINs programmatically, based on some data. Any pointers?

Phenek commented 6 years ago

Did you try to set Pin Draggable property to true? I don't know if it's what you expect.

manmohan006 commented 6 years ago

No, I do not want the application user to drag or interact with the pin. I just need to keep moving the Pin to a new position through code, based on some data I receive. I tried removing and adding the Pin (with the new position) to the Pins collection. Though that works, it gives a visible flicker of the map. I am trying to figure out a way to move the Pin smoothly, with no flicker on the map.

veryhumble commented 6 years ago

The Map flickers how?

Are you moving the Pin to outside the visible area of the Map? If so, the map might need to load its map tiles, which could cause a "flicker".

manmohan006 commented 6 years ago

Yes, you are right. By “flicker”, I mean the map trying to adjust it’s visible area to accommodate the pins (Sorry if I have not been clear enough). But what I would like to achieve is a smooth transitioning experience of the visible area (as in apps like Uber), than a sudden “flickering” experience.

linda-dge commented 5 years ago

I would like to know this as well. I made the pin be a variable and am setting PinName.Location = new Position(lat,lon) when a region is changed.