GraphHopper.com | Forum | GitHub | Maps | Blog

Block_area isn't working


#1

Hi,

I’m using the graphhopper-js-api-client for a university project and tried to define areas which should be avoided. I did this with the parameter “block_area”, but graphhopper doesn’t avoid the defined areas. My code looks like this:

const ghRouting = new GraphHopperRouting(
{
key: GRAPHHOPPER_KEY,
vehicle: ‘bike’,
elevation: false,
weighting:“fastest”,
ch: {disabled: true},
block_area: ‘52.517064, 13.390688, 300’
});

locations.forEach((location) => {
ghRouting.addPoint(new GHInput(location));
});

I tried this with plenty of areas, so I think it hasn’t to do with this issue: How to make sure block_area is always respected?
I hope you can help and I wish you happy holidays :slight_smile:

Simon


#2

Maybe some client issue. When you query this on GH Maps it works: https://graphhopper.com/maps/?point=52.516965%2C13.38388&point=52.518519%2C13.402483&ch.disable=true&block_area=52.517064,13.390688,300


#3

thanks for the quick response. I will check this out


#4

For anyone who wants to know if I found a solution…I did :slight_smile:
Instead of using the graphhopper-js-api-client I used axios and now its working!
Thanks for your help @karussell :slight_smile: