开发者

LocationToViewportPoint issue

I have an issue with this where LocationToViewportPoint for Bing Maps is calculating ba开发者_JAVA技巧sed on current viewport of the map as opposed to calculating the target viewport point.

The reason is because if the user is panning/zooming the map, this method will return inconsistent results.

I've tried reflecting this method but to no avail, does anyone have any more insight on how to solve this problem?


Solved this:

What I had to do was turn off the AnimationLevel for (panning/zooming) and explicitly SetView to the target bounding rectangle and then performed whatever calculations I needed to calculate the Map's new center point.

I then changed the AnimationLevel back on and then setting the new Map's center point for the map to zoom/pan to.

Apparently the LocationToViewportPoint had a dependency on AnimationLevel and "current" view.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜