UnifiedMaps icon indicating copy to clipboard operation
UnifiedMaps copied to clipboard

Move a PIN on the map

Open manmohan006 opened this issue 6 years ago • 5 comments

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?

manmohan006 avatar Nov 12 '18 07:11 manmohan006

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

Phenek avatar Nov 14 '18 11:11 Phenek

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.

manmohan006 avatar Nov 14 '18 12:11 manmohan006

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".

veryhumble avatar Nov 14 '18 12:11 veryhumble

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.

manmohan006 avatar Nov 14 '18 16:11 manmohan006

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.

linda-dge avatar Jun 06 '19 18:06 linda-dge