Skip to content

Commit 0b01546

Browse files
authored
fix: /tile request should be with verbose = true (#321)
1 parent 470ef7f commit 0b01546

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<img width="2253" height="1303" alt="image" src="https://github.com/user-attachments/assets/00f43ea8-51df-4319-ad31-4feadf0024c1" />
44

5-
65
This is the ReactJS demo web app running on https://valhalla.openstreetmap.de. It provides routing and isochrones with a magnitude of options and makes requests to [Valhalla](https://github.com/valhalla/valhalla), an open source routing engine and accompanying libraries for use with OpenStreetMap data.
76

87
## Commands
@@ -27,6 +26,12 @@ This project includes end-to-end tests using [Playwright](https://playwright.dev
2726

2827
### Running Tests
2928

29+
First install the `playwright` browsers:
30+
31+
```bash
32+
npx playwright install
33+
```
34+
3035
```bash
3136
# Run all e2e tests in headless mode
3237
npm run test:e2e

src/components/tiles/valhalla-layers.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('valhalla-layers', () => {
130130
it('should have properly encoded JSON structure', () => {
131131
const url = getValhallaTileUrl();
132132
const expectedEncoded =
133-
'%7B%22tile%22%3A%7B%22z%22%3A{z}%2C%22x%22%3A{x}%2C%22y%22%3A{y}%7D%7D';
133+
'%7B%22verbose%22%3A%20true%2C%20%22tile%22%3A%7B%22z%22%3A{z}%2C%22x%22%3A{x}%2C%22y%22%3A{y}%7D%7D';
134134

135135
expect(url).toContain(expectedEncoded);
136136
});

src/components/tiles/valhalla-layers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const VALHALLA_NODES_LAYER_ID = 'valhalla-nodes';
88
// Pre-encoded JSON: {"tile":{"z":{z},"x":{x},"y":{y}}}
99
// Placeholders {z}, {x}, {y} remain unencoded for MapLibre to replace
1010
const TILE_JSON_ENCODED =
11-
'%7B%22tile%22%3A%7B%22z%22%3A{z}%2C%22x%22%3A{x}%2C%22y%22%3A{y}%7D%7D';
11+
'%7B%22verbose%22%3A%20true%2C%20%22tile%22%3A%7B%22z%22%3A{z}%2C%22x%22%3A{x}%2C%22y%22%3A{y}%7D%7D';
1212

1313
export function getValhallaTileUrl(): string {
1414
const baseUrl = normalizeBaseUrl(getBaseUrl());

0 commit comments

Comments
 (0)