Skip to content

Commit

Permalink
Support MapLibre v4 (#227)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump svelte-spa-router from 3.3.0 to 4.0.1

Bumps [svelte-spa-router](https://github.com/ItalyPaleAle/svelte-spa-router) from 3.3.0 to 4.0.1.
- [Release notes](https://github.com/ItalyPaleAle/svelte-spa-router/releases)
- [Changelog](https://github.com/ItalyPaleAle/svelte-spa-router/blob/main/CHANGELOG.md)
- [Commits](ItalyPaleAle/svelte-spa-router@v3.3.0...v4.0.1)

---
updated-dependencies:
- dependency-name: svelte-spa-router
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump eslint from 8.56.0 to 8.57.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.56.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump nanoid from 5.0.4 to 5.0.6

Bumps [nanoid](https://github.com/ai/nanoid) from 5.0.4 to 5.0.6.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@5.0.4...5.0.6)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump postcss-load-config from 4.0.2 to 5.0.3

Bumps [postcss-load-config](https://github.com/postcss/postcss-load-config) from 4.0.2 to 5.0.3.
- [Release notes](https://github.com/postcss/postcss-load-config/releases)
- [Changelog](https://github.com/postcss/postcss-load-config/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss-load-config@v4.0.2...v5.0.3)

---
updated-dependencies:
- dependency-name: postcss-load-config
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump prettier-plugin-svelte from 3.1.2 to 3.2.2

Bumps [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) from 3.1.2 to 3.2.2.
- [Changelog](https://github.com/sveltejs/prettier-plugin-svelte/blob/master/CHANGELOG.md)
- [Commits](sveltejs/prettier-plugin-svelte@v3.1.2...v3.2.2)

---
updated-dependencies:
- dependency-name: prettier-plugin-svelte
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump lint-staged from 15.2.0 to 15.2.2

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.2.0 to 15.2.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v15.2.0...v15.2.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump svelte from 4.2.8 to 4.2.12

Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.8 to 4.2.12.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.12/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.12/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump prettier from 3.1.1 to 3.2.5

Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.1.1...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump husky from 8.0.3 to 9.0.11

Bumps [husky](https://github.com/typicode/husky) from 8.0.3 to 9.0.11.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v8.0.3...v9.0.11)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump svelte-check from 3.6.2 to 3.6.8

Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.6.2 to 3.6.8.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](sveltejs/language-tools@svelte-check-3.6.2...svelte-check-3.6.8)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump postcss from 8.4.33 to 8.4.38

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.33 to 8.4.38.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.33...8.4.38)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump @tsconfig/svelte from 5.0.2 to 5.0.4

Bumps [@tsconfig/svelte](https://github.com/tsconfig/bases/tree/HEAD/bases) from 5.0.2 to 5.0.4.
- [Commits](https://github.com/tsconfig/bases/commits/HEAD/bases)

---
updated-dependencies:
- dependency-name: "@tsconfig/svelte"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump @types/lodash from 4.14.202 to 4.17.0

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.202 to 4.17.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump autoprefixer from 10.4.16 to 10.4.19

Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.16 to 10.4.19.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.4.16...10.4.19)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 6.18.1 to 7.7.0

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.18.1 to 7.7.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.7.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps-dev): bump tailwindcss from 3.4.1 to 3.4.3

Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.1 to 3.4.3.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.3/CHANGELOG.md)
- [Commits](tailwindlabs/tailwindcss@v3.4.1...v3.4.3)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update deps and reformat the code with updated rules

* Update MapLibre to v4
Use MapLibre v4's version of handling custom attributions
Use of updated loadImage API

* Update Vite to 4.5.3 (to fix a vulnerability)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
smellyshovel and dependabot[bot] authored Apr 20, 2024
1 parent 32331d7 commit bbf1499
Show file tree
Hide file tree
Showing 16 changed files with 150 additions and 48 deletions.
8 changes: 7 additions & 1 deletion demo/src/examples/1 User Interaction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new MapLibreGlDirections(map, {
requestOptions: {
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/10 Bearings Support and Control.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new MapLibreGlDirections(map, {
bearings: true,
Expand Down
36 changes: 25 additions & 11 deletions demo/src/examples/11 Restyling.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,45 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution:
'<a href=\'http://project-osrm.org/\' target=\'_blank\'>&copy; OSRM</a> | Icons made by <a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> and by <a href="https://www.flaticon.com/authors/dinosoftlabs" title="DinosoftLabs">DinosoftLabs</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>',
fadeDuration: 0,
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution:
'<a href=\'http://project-osrm.org/\' target=\'_blank\'>&copy; OSRM</a> | Icons made by <a href="https://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> and by <a href="https://www.flaticon.com/authors/dinosoftlabs" title="DinosoftLabs">DinosoftLabs</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>',
}),
);
map.on("load", () => {
// make sure to load and add the images used by the custom directions' styles first:
// a balloon for thw waypoints,
map.loadImage(balloonWaypointImgUrl, (error, image) => {
if (!error && image) map.addImage("balloon-waypoint", image);
map.loadImage(balloonWaypointImgUrl).then((image) => {
if (image) {
map.addImage("balloon-waypoint", image.data);
}
});
// a balloon for the snappoints,
map.loadImage(balloonSnappointImgUrl, (error, image) => {
if (!error && image) map.addImage("balloon-snappoint", image);
map.loadImage(balloonSnappointImgUrl).then((image) => {
if (image) {
map.addImage("balloon-snappoint", image.data);
}
});
// a balloon for the hoverpoints
map.loadImage(balloonHoverpointImgUrl, (error, image) => {
if (!error && image) map.addImage("balloon-hoverpoint", image);
// a balloon for the hoverpoints,
map.loadImage(balloonHoverpointImgUrl).then((image) => {
if (image) {
map.addImage("balloon-hoverpoint", image.data);
}
});
// and a pattern-image for the routelines.
map.loadImage(routelineImgUrl, (error, image) => {
if (!error && image) map.addImage("routeline", image);
map.loadImage(routelineImgUrl).then((image) => {
if (image) {
map.addImage("routeline", image.data);
}
});
directions = new MapLibreGlDirections(map, {
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/12 Distance Measurement.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new DistanceMeasurementMapLibreGlDirections(map, config);
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/13 Load and Save.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new CustomMapLibreGlDirections(map);
directions.interactive = true;
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/14 Multiple profiles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
_map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
_map.on("load", () => {
map = _map;
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/2 Programmatical Control.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
_map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
_map.on("load", () => {
map = _map;
Expand Down
10 changes: 8 additions & 2 deletions demo/src/examples/3 Mapbox Directions API and Congestions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution:
"<a href='//docs.mapbox.com/help/getting-started/directions/' target='_blank'>&copy; Mapbox Directions</a>",
attributionControl: false,
});
_map.addControl(
new maplibregl.AttributionControl({
customAttribution:
"<a href='//docs.mapbox.com/help/getting-started/directions/' target='_blank'>&copy; Mapbox Directions</a>",
}),
);
_map.on("load", () => {
map = _map;
});
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/4 Origin and Destination.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
fadeDuration: 0,
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
const layers = layersFactory();
layers.push({
id: "maplibre-gl-directions-waypoint-label",
Expand Down
14 changes: 10 additions & 4 deletions demo/src/examples/5 Show Routes' Directions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
// load the arrow image and add it to the map
map.loadImage(DirectionArrowImageUrl, (error, image) => {
if (!error && image) {
map.addImage("direction-arrow", image);
map.loadImage(DirectionArrowImageUrl).then((image) => {
if (image) {
map.addImage("direction-arrow", image.data);
}
});
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/6 Touch-Friendly Features.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
_map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
_map.on("load", () => {
map = _map;
});
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/7 Events.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new MapLibreGlDirections(map, {
requestOptions: {
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/8 Aborting Requests.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
attributionControl: false,
});
_map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
_map.on("load", () => {
map = _map;
});
Expand Down
8 changes: 7 additions & 1 deletion demo/src/examples/9 Loading Indicator Control.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
style,
center: [-74.1197632, 40.6974034],
zoom: 11,
customAttribution: "<a href='http://project-osrm.org/' target='_blank'>&copy; OSRM</a>",
attributionControl: false,
});
map.addControl(
new maplibregl.AttributionControl({
customAttribution: "<a href='http://project-osrm.org/' target='_blank' rel='noreferrer'>&copy; OSRM</a>",
}),
);
map.on("load", () => {
directions = new MapLibreGlDirections(map, {
requestOptions: {
Expand Down
44 changes: 27 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bbf1499

Please sign in to comment.