【问题标题】:How can I turn MapPos/(long,lat) into Pixels under Nutiteq?如何在 Nutiteq 下将 MapPos/(long,lat) 转换为 Pixels?
【发布时间】:2014-08-08 21:51:14
【问题描述】:

我已经深入阅读了Nutiteq Api Reference,但我还没有找到在设备上获取longitude 和latitude 的像素表示的内置方法。现有的Projections 下没有任何内容,所以我不知道如何解决这个问题。

我想做的是像这样为我的实际GPS Location 画一个circle,

不像HelloMap3D 中的n-vertices Polygon。

在给定的Zoom Level 下获取lat、lon 和radius 的像素是一个挑战,因为剩下的就是这样的调用

...
canvas.drawCircle(longitudeInPixel, latitudeInPixel, radiusInPixel, this.paintStroke); // <- For blue circunference
canvas.drawCircle(longitudeInPixel, latitudeInPixel, radiusInPixel, this.paintFill);   // <- For blue translucent circle
...

那么,我如何将lat、lon 和radius 转换为Nutiteq 下的像素表示?

提前感谢大家。

【问题讨论】:

    标签: gps geometry map-projections nutiteq


    【解决方案1】:

    MapView 对此有 worldToScreen() 方法,请参阅 Nutiteq Android 演示项目 wiki 中的 Map Calculations 页面。

    【讨论】:

    • 非常感谢,Jaak,这正是我想要的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-16
    相关资源
    最近更新 更多