kml文件中的坐标在模拟器中修改

时间:2013-02-24 16:09:50

标签: android eclipse gps emulation ddms

将坐标从kml文件发送到我的模拟器时遇到了一些麻烦。 例如,我发送了long: 13,428753 lat: 52,518823,我收到了:13.42875166666666952.51882166666666

使用这些坐标在GoogleMap上创建标记时,我会收到一个位置略有不同的标记,但这会打破LatLng对象之间的比较。我有什么想法可以解决这个问题吗?如果需要,我可以提供更多信息。

我如何收到我的数据:

@Override
    public void onLocationChanged(Location location) {  
        if(CurrentJourney.getInstance().getJourney() == null) {
            return;
        }

        CurrentJourney.getInstance().getJourney().getCoordinates()
            .add(new LatLng (location.getLatitude(), location.getLongitude()));

        String latitude = String.valueOf(location.getLatitude());
        String longitude = String.valueOf(location.getLongitude());

        Intent intent = new Intent(ACTION_NEW_LOCATION);
        intent.putExtra(EXTRA_NEW_LATITUDE, latitude);
        intent.putExtra(EXTRA_NEW_LONGITUDE, longitude);
        sendBroadcast(intent);
    }

0 个答案:

没有答案