PATRIK27 / osmdroid

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

DefaultResourceProxyImpl is broken? #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I can't get DefaultResourceProxyImpl to work for me. It always says that the 
resource is not found. This includes when I try to use it in the samples 
(instead of the ResourceProxyImpl).

I tried a few things to get it to work, but it always can't find the resource 
in the JAR. Anyone else have this issue? or a solution?

Original issue reported on code.google.com by kurtzm...@gmail.com on 21 Mar 2011 at 3:34

GoogleCodeExporter commented 8 years ago
I'm sorry, I should be more specific. What doesn't work is loading Bitmaps. 
Specifically, this line (106):

is = getClass().getResourceAsStream(resName);

In the debugger I've tried:
getClass().getResourceAsStream("center.png");
getClass().getResourceAsStream("/center.png");
getClass().getResourceAsStream("\\center.png");

and they all return null.

Original comment by kurtzm...@gmail.com on 21 Mar 2011 at 3:41

GoogleCodeExporter commented 8 years ago
Never mind - this is because the OpenStreetMapViewer project doesn't use the 
JAR file, so it fails. When you use the JAR proper, it works.

Original comment by kurtzm...@gmail.com on 21 Mar 2011 at 3:59