-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c35926
commit 58561da
Showing
14 changed files
with
528 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts"> | ||
import type { Feature, Polygon } from "geojson"; | ||
import { FillLayer, GeoJSON } from "svelte-maplibre"; | ||
export let boundary: Feature<Polygon>; | ||
</script> | ||
|
||
<GeoJSON data={boundary}> | ||
<FillLayer | ||
paint={{ | ||
"fill-color": "black", | ||
"fill-opacity": 0.5, | ||
}} | ||
/> | ||
</GeoJSON> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script lang="ts"> | ||
import type { Feature } from "geojson"; | ||
import { CircleLayer, FillLayer, GeoJSON, LineLayer } from "svelte-maplibre"; | ||
import { | ||
constructMatchExpression, | ||
isLine, | ||
isPoint, | ||
isPolygon, | ||
} from "./index"; | ||
import { routeToolGj } from "./stores"; | ||
const circleRadiusPixels = 10; | ||
</script> | ||
|
||
<GeoJSON data={$routeToolGj}> | ||
<CircleLayer | ||
filter={isPoint} | ||
paint={{ | ||
"circle-color": constructMatchExpression( | ||
["get", "type"], | ||
{ | ||
"snapped-waypoint": "red", | ||
"free-waypoint": "blue", | ||
}, | ||
"black" | ||
), | ||
"circle-opacity": ["case", ["has", "hovered"], 0.5, 1.0], | ||
"circle-radius": constructMatchExpression( | ||
["get", "type"], | ||
{ node: circleRadiusPixels / 2.0 }, | ||
circleRadiusPixels | ||
), | ||
}} | ||
/> | ||
<LineLayer | ||
filter={isLine} | ||
paint={{ | ||
"line-color": ["case", ["get", "snapped"], "red", "blue"], | ||
"line-width": 2.5, | ||
}} | ||
/> | ||
<FillLayer | ||
filter={isPolygon} | ||
paint={{ | ||
"fill-color": "black", | ||
"fill-opacity": 0.5, | ||
}} | ||
/> | ||
</GeoJSON> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.