WPF Marker Position or Draw

Topics: WPF
Jul 20, 2010 at 10:14 AM

One more "small" but verry user annoing problem.

On map grad markers redrawing with "small" position change. On big zoom (>= 15) difference big.

Also this problem create related problem with popup. Even in your example on big zoom level popup may not appear if you place mouse point over marker, becouse logical marker placed near.


Jul 20, 2010 at 11:01 AM


Jul 20, 2010 at 12:48 PM

Change in your sample max zoom to 20. Run it. Run transport demo. Find bus that not move. Zoom to max on it. Drag map. Marker jumping and not keep his position. On smaller zoom level this present too but not so visible.

Jul 20, 2010 at 1:25 PM

..and how to fix it? ;}

Jul 20, 2010 at 2:48 PM
Edited Jul 20, 2010 at 2:56 PM


Review your code, find problem and fix it.


You can start from replacing double by decimal.

Jul 20, 2010 at 4:19 PM

i like your style of 'fixing' problems ;} helps zero

Jul 20, 2010 at 7:21 PM

Sorry have amnezia, forgot that it's I create controll and know its all lines :(

I try use your control (and verry appreciative for it) and show you my experience and problems to make it better. In points I can help - I try. This problem tottaly insede control and to fix it  - need know controll verry well.

I think problem in double you use for position calculation. Same as float it have not absolute precision.

Decimal have biger precision and maybe it will help if you replace double by decimal in position calculation, store.

Double precision - 15 - 16 digits

Decimal precision - 28 - 29 digits

Jul 20, 2010 at 7:34 PM

..well float is more than enough, the problem is somewhere else, i still can't locate it, i guess my amnesia is much deeper ;}

Jul 20, 2010 at 7:41 PM

This problem strange because for mouse over event - shape all time in right place BUT rendered it in wrong place.

Maybe problem in part that render shape?


your bus control and my custom control with mouse over popup work same:

1. on big zoom level - visualy control jump after map drag or zoom

2. but when you try get pop up - it opened not where control displayed but near, by calculation mouse over event fire in right place.

Jul 20, 2010 at 7:48 PM


Jul 21, 2010 at 10:43 AM

Also maybe related to this :

when marker removed on big zoom level and after map drag - controll not totaly clear tile from marker, some time left parts 1-3 pixels from right or top of marker.

Jul 21, 2010 at 11:00 AM