Hi there, I need to block certain street segments for navigation. So far we used block_area in a POST request with the list of points (center of the segment) with a radius of 10. As block_area is now deprecated, we transition to customModel. There we use
Map<String, JsonFeature> areas = new HashMap<>();
areas.put("avoid", new JsonFeature("avoid",
"Feature",
null,
multiPolygon,
new HashMap<>()));
customModel.setAreas(areas);
I don’t know what the ‘multiPolygon’ in your example looks like. Does it fulfill all the conditions mentioned there? And did you try blocking a street segment the way you want to do this on graphhopper.com/maps? Does it work there?
Thanks, with your help I could figure it out. My JSON format for the area definition was wrong, as I named it “area” instead of “custom1”.
Also I noticed, that while GHRequest supports customModel, GraphHopperWeb does not at the time. So my POST requests didn’t even contain the customModels!