jiaojian1 / osmdroid

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

Wrong Lat / Lng- Span returned from the OpenStreetMapView #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I think I found a copy-paste error in the OpenStreetMapView:

public double getLatitudeSpan() {
  return this.getDrawnBoundingBoxE6().getLongitudeSpanE6() / 1E6;
}
public int getLatitudeSpanE6() {
  return this.getDrawnBoundingBoxE6().getLatitudeSpanE6();
}
public double getLongitudeSpan() {
  return this.getDrawnBoundingBoxE6().getLatitudeSpanE6() / 1E6;
}
public int getLongitudeSpanE6() {
  return this.getDrawnBoundingBoxE6().getLatitudeSpanE6();
}

Workaround: Get the Span directly from the BoundinBoxE6

Kind regards
Maxim

Original issue reported on code.google.com by tourist...@gmail.com on 27 May 2009 at 12:03

GoogleCodeExporter commented 9 years ago
Fixed in rev 81.

Original comment by ThyMythos@googlemail.com on 29 Oct 2009 at 9:07

GoogleCodeExporter commented 9 years ago
getLatitudeSpan() and getLongitudeSpanE6() always return wrong value:

        public double getLatitudeSpan() {
                return this.getDrawnBoundingBoxE6().getLongitudeSpanE6() / 1E6;
        }

        public int getLongitudeSpanE6() {
                return this.getDrawnBoundingBoxE6().getLatitudeSpanE6();
        }

I noticed this in current trunk (rev 448) and in osmdroid-android-10.7.jar. 

Regards, 
Jérémie

Original comment by huchet.j...@gmail.com on 2 Nov 2010 at 1:20

GoogleCodeExporter commented 9 years ago
I saw the same thing. Can someone reopen this issue ?
Thanks

Original comment by o.bou...@gmail.com on 11 Nov 2010 at 5:34

GoogleCodeExporter commented 9 years ago
fixed again in revision 482

Original comment by neilboyd on 11 Nov 2010 at 7:20

GoogleCodeExporter commented 9 years ago
I think you also missed:

    public int getLongitudeSpanE6() {
        return this.getDrawnBoundingBoxE6().getLatitudeSpanE6();
    }

Original comment by kurtzm...@gmail.com on 12 Nov 2010 at 4:19

GoogleCodeExporter commented 9 years ago
Fixed in revision 486 (why didn't Google Code automatically pick up on the 
comment?)

Original comment by neilboyd on 12 Nov 2010 at 8:10