org.xml.sax.SAXException: No input specified.

404 views
Skip to first unread message

Yukai Lin

unread,
Mar 25, 2013, 2:31:19 AM3/25/13
to mapsfo...@googlegroups.com

Hi I was wondering if anyone has encountered this problem before? This is part of my codes in my fragments class:

public View onCreateView(LayoutInflater inflator, ViewGroup container, Bundle savedInstanceState) {

myOpenMapView = new MapView(getMapContext());

File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "offlineMap/singapore.map");

myOpenMapView.setMapFile(file);

return myOpenMapView;

}

Everything seems to be working fine to read the mapfile and I have assured that it exists, but I'm encountering the error below. Anybody has any idea what's this problem below?


03-25 14:14:41.445: E/DatabaseRenderer(1736): null

03-25 14:14:41.445: E/DatabaseRenderer(1736): org.xml.sax.SAXException: No input specified.

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:288)

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.mapsforge.map.rendertheme.rule.RenderThemeHandler.getRenderTheme(RenderThemeHandler.java:71)

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.mapsforge.android.maps.mapgenerator.databaserenderer.DatabaseRenderer.getRenderTheme(DatabaseRenderer.java:64)

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.mapsforge.android.maps.mapgenerator.databaserenderer.DatabaseRenderer.executeJob(DatabaseRenderer.java:151)

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.mapsforge.android.maps.mapgenerator.MapWorker.doWork(MapWorker.java:74)

03-25 14:14:41.445: E/DatabaseRenderer(1736):                at org.mapsforge.android.maps.PausableThread.run(PausableThread.java:141)

Yukai Lin

unread,
Mar 25, 2013, 3:02:39 AM3/25/13
to mapsfo...@googlegroups.com
I just realized, in my own library project for mapsforge, i didn't include the resources folder, that contains the renderTheme.xsd as well as all the png files in the osmrender.

Is that why that is causing the problem? If so, where should I be putting the resources folder in? I tried putting in the res folder and it gives error. 

Ludwig

unread,
Mar 25, 2013, 3:56:37 AM3/25/13
to mapsfo...@googlegroups.com
The problem seems to be that you are not including the internal render theme at all.

You do not have to use the internal render theme if you do not want to, but then you will need to set your own rendertheme (from a file) first.

The usual way of getting the internal render theme is to include the mapsforge-map-jar-with-dependencies jar, but if you are building your own library project you will need to include the src/main/resources branch as well.

HTH
Ludwig


On 25 March 2013 15:02, Yukai Lin <yukai...@gmail.com> wrote:
I just realized, in my own library project for mapsforge, i didn't include the resources folder, that contains the renderTheme.xsd as well as all the png files in the osmrender.

Is that why that is causing the problem? If so, where should I be putting the resources folder in? I tried putting in the res folder and it gives error. 

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Yukai Lin

unread,
Mar 25, 2013, 4:09:13 AM3/25/13
to mapsfo...@googlegroups.com
Yea I just realized this problem through doing my own library project. I'm quite confused though. What folders should be included, and where should they be placed? I included everything in the resources folder from mapsforge-render-theme in the res folder but it doesn't seem to work.

This is how my library project looks now currently:

Yukai Lin

unread,
Mar 29, 2013, 12:54:05 PM3/29/13
to mapsfo...@googlegroups.com
Hi developers,

I have managed to solve this issue in my project library with 0.3.1, by just pasting the resources folder in the root project library. However, I am now trying to explore building a project library for version 0.3.0 instead and I'm encountering this same problem, even when I have done the exact same thing for my 0.3.0 library (except that I have followed the folder conventioned in the 0.3.0 branch). Can I check if I am supposed to manually do "MapView.setRenderTheme(File) " ? Or is this automatically done just like in 0.3.1?
Reply all
Reply to author
Forward
0 new messages