Drawing route on Google Maps using Google Maps Android API v2

后端 未结 3 1471
攒了一身酷
攒了一身酷 2020-12-30 14:08

I have an app in which I am continuously tracking user\'s location using Google Plays new service API for Maps. I am updating the location every single second and I am also

3条回答
  •  再見小時候
    2020-12-30 15:06

    You should split your problem into the aspects of data collection and data display.

    Therefore take two coordinates you precisely know and draw a straight polyline on google maps. If it's really displayed at the wrong location, GoogleMap has indeed a bug, which BTW I don't believe.

    Then print out your coordinates e.g. to LogCat before drawing them and check the coordinates. If they are wrong, it is not a problem of GoogleMaps but of the LocationProvider or of how you use it.

    If the coordinates are collected correctly, you may pick them somehow up from LogCat and use them directly in your code to draw a polyline. If then the polyline is displaced, you may again have found a bug in GoogleMap. Then you should paste the coordinates here, so someone can reproduce it. It may be device dependent. I never had a polyline which did not match the map.

提交回复
热议问题