hi, I’m using version 0.9
I follow the example on github, but I get following error:
java.lang.UnsupportedOperationException: Cannot create DataReader. Solutions: avoid import via calling load directly, provide a DataReader or use e.g. GraphHopperOSM or a different subclass
at com.graphhopper.GraphHopper.createReader(GraphHopper.java:717)
at com.graphhopper.GraphHopper.importData(GraphHopper.java:710)
at com.graphhopper.GraphHopper.process(GraphHopper.java:681)
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:659)
at controller.PlanningController.test(PlanningController.java:28)
My maven configure:
com.graphhopper
graphhopper-core
0.9.0
com.graphhopper
graphhopper-reader-osm
0.9.0
com.graphhopper
graphhopper-map-matching-core
0.9.0
My code:
> hopper = new GraphHopper().forServer();
25> hopper.setDataReaderFile("/WEB-INF/map-resource/hk_area.osm");
26> hopper.setGraphHopperLocation("/WEB-INF/graphhopper");
27> hopper.setEncodingManager(new EncodingManager(“car”));
28> hopper.importOrLoad();
anyone can help figure this problem?