haidonghuang / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

List<GeoPoint> to Path error #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is an error in the transformation of a list of Geopoints to a Path in 
OpenStreetMapView.java. Basically it will always draw a line from the point 
of origin (0,0) to the first point because the first point is not entered 
correctly. Fixing it is trivial and involves only moving the increment 
operation further down the loop so that the first point will be entered 
with moveTo rather than drawLine. Patch is attached.

HTH

Ludwig

Original issue reported on code.google.com by LudwigBr...@gmail.com on 2 Feb 2009 at 8:28

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

I have the same problem, but it gets more complicated when we use Path reuse.

This is my correction.

Thanks

Original comment by fabien.c...@gmail.com on 1 May 2009 at 5:31

Attachments:

GoogleCodeExporter commented 9 years ago
This looks pretty obvious in revision 10
int i = 0
...
i++
...
if (i == 0)

But it was fixed in revision 65
boolean first = true
...
if (first)
...
first = false

Original comment by neilboyd on 26 Mar 2010 at 2:43