tanweijiu / osmbonuspack

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

java.lang.NoSuchMethodError: org.osmdroid.views.MapView.getProjection #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to create a new marker

Marker startMarker = new Marker(mapView);
                startMarker.setPosition(new GeoPoint(o.getLatitude(), o.getLongitude()));
                startMarker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);
                mapView.getOverlays().add(startMarker);

What is the expected output? What do you see instead?
I expect a marker at the position, instead the app crashes with the following 
error.

java.lang.NoSuchMethodError: org.osmdroid.views.MapView.getProjection
            at org.osmdroid.bonuspack.overlays.Marker.draw(Marker.java:275)
            at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:141)

What version of the products are you using (Android SDK, osmdroid,
OSMBonusPack)?

targetSdkVersion 19
osmdroid 4.1
osmbonuspack 4.5

Please provide any additional information below.

Original issue reported on code.google.com by pete.sta...@gmail.com on 14 May 2014 at 5:08

GoogleCodeExporter commented 9 years ago
As mentioned in HowToInclude wiki page, osmbonuspack 4.5 is based on osmdroid 
4.2. 
It was a major change, you MUST upgrade your osmdroid jar. 

Original comment by mathieu....@gmail.com on 15 May 2014 at 8:41

GoogleCodeExporter commented 9 years ago
Sorry about that, I thought I triple checked everything. Thanks for your help.

Original comment by pete.sta...@gmail.com on 15 May 2014 at 1:50

GoogleCodeExporter commented 9 years ago
From v4.5, osmbonuspack is also using 2 libs: 
- gson-2.2.4.jar
- mapsforge-map-0.3.1-SNAPSHOT-jar-with-dependencies.jar (a customized version 
of Mapsforge, for integration with osmdroid)

When adding osmbonuspack as a jar in an Android application project, I'm not 
sure if these libs must also be added. I have to check. 

Original comment by mathieu....@gmail.com on 15 May 2014 at 8:29

GoogleCodeExporter commented 9 years ago
FYI I have markers working now with osmdroid 4.2 and I did not need to include 
those libraries.

Original comment by pete.sta...@gmail.com on 15 May 2014 at 8:32

GoogleCodeExporter commented 9 years ago
OK, thanks for this feedback. 
I close the issue. 

Original comment by mathieu....@gmail.com on 16 May 2014 at 7:21

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by meh.bis...@gmail.com on 4 Sep 2014 at 10:14