简体   繁体   English

覆盖Google Maps,Android

[英]Overlay in google Maps, Android

I have the next problem: I want to put overlays in a mapView of googleMaps. 我有下一个问题:我想将叠加层放置在googleMaps的mapView中。 I load the coordinates from a data server, then, I convert it to intE6 type. 我从数据服务器加载坐标,然后将其转换为intE6类型。 But when I put the GeoPoint in the map, it appear in other site, I try to put other points and the distance between points is good but they are displaced to other site. 但是,当我将GeoPoint放置在地图中时,它出现在其他站点中,我尝试放置其他点,并且这些点之间的距离很好,但是它们已移至其他站点。 I think that the problem probably is the map configuration but I dont know where because I checked the coordinates of these points and are good and time ago it worked with other coordinates. 我认为问题可能出在地图配置上,但我不知道在哪里,因为我检查了这些点的坐标,并且很好,并且在一段时间之前它可以与其他坐标一起使用。

Thanks for your reply :) 感谢您的回复 :)

I check it and the conversion is good: 我检查一下,转换效果很好:

float latitude = (float) json_data.getDouble("latitude");
float longitude = (float) json_data.getDouble("longitude");

Log.d("POINT",(int)(latitude*1E6)+" "+ (int)((longitude*1E6)));

GeoPoint p = new GeoPoint((int)(latitude*1E6), (int)(longitude*1E6));

Log.d("POINT", ""+p.getLatitudeE6()+" "+p.getLongitudeE6());

SOLVED: My fault, it works properly, there was other error in my code 求助:我的错,它可以正常工作,我的代码中还有其他错误

已解决:我的错,它可以正常工作,我的代码中还有其他错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM