osmdroid 和 Android 应用程序的地理点是否不同?
我正在为我的 Android 应用程序使用 OsmDroid。我设置了一个 IGeoPoint,如下所示,
IGeoPoint point2 = new IGeoPoint() {
public int getLongitudeE6() {
return 51475022;
}
public int getLatitudeE6() {
return -300322;
}
};
mapController.animateTo(point2);
这将我带到了深蓝色的大海。而当我使用 google.mapview 并按以下方式设置地理点时,
myMapController.animateTo(new GeoPoint((int) (51.475022 * 1E6),
(int) (-0.300322 * 1E6)));
它会将我带到我想要的地方
osmdroid 有什么问题吗?
I am using OsmDroid for my Android application. I am setting a IGeoPoint as follows
IGeoPoint point2 = new IGeoPoint() {
public int getLongitudeE6() {
return 51475022;
}
public int getLatitudeE6() {
return -300322;
}
};
mapController.animateTo(point2);
this took me to deep blue sea. Whereas when I use google.mapview and set geopoint in following way
myMapController.animateTo(new GeoPoint((int) (51.475022 * 1E6),
(int) (-0.300322 * 1E6)));
it takes me to where I want
What's wrong with osmdroid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么要尝试为接口创建构造函数?
Osmdroid GeoPoint 是一个实现该接口的类。您只需要实例化一个 GeoPoint,如下所示:
然后将其传递给您的 .animate()
Why are you trying to create a constructor for an Interface?
The Osmdroid GeoPoint is a class which implements this interface. You just need to instantiate a GeoPoint, like this:
Then pass this to your .animate()