Skip to content

Commit

Permalink
Refactor Geocoder
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Apr 27, 2024
1 parent 98d1d5e commit c3cb831
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 36 deletions.
13 changes: 8 additions & 5 deletions web/package-lock.json

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

1 change: 0 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"vite-plugin-wasm-pack": "0.1.11"
},
"dependencies": {
"@maptiler/geocoding-control": "^1.2.2",
"@picocss/pico": "^2.0.3",
"maplibre-draw-polygon": "github:dabreegster/maplibre-draw-polygon",
"svelte-maplibre": "^0.8.1",
Expand Down
5 changes: 3 additions & 2 deletions web/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script lang="ts">
import "@picocss/pico/css/pico.jade.min.css";
import init, { MapModel } from "backend";
import { Geocoder } from "svelte-utils";
import type { Map } from "maplibre-gl";
import { onMount } from "svelte";
import { FillLayer, GeoJSON, MapLibre } from "svelte-maplibre";
import { Geocoder, Layout } from "./common";
import { Layout } from "./common";
import { PolygonToolLayer } from "maplibre-draw-polygon";
import DebugMode from "./DebugMode.svelte";
import IsochroneMode from "./IsochroneMode.svelte";
Expand Down Expand Up @@ -77,7 +78,7 @@
hash
bind:map
>
<Geocoder />
<Geocoder {map} apiKey={maptilerApiKey} />
<div bind:this={mapDiv} />

<PolygonToolLayer />
Expand Down
27 changes: 0 additions & 27 deletions web/src/common/Geocoder.svelte

This file was deleted.

1 change: 0 additions & 1 deletion web/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {
ExpressionSpecification,
} from "maplibre-gl";

export { default as Geocoder } from "./Geocoder.svelte";
export { default as Layout } from "./Layout.svelte";
export { default as Modal } from "./Modal.svelte";
export { default as OverpassSelector } from "./OverpassSelector.svelte";
Expand Down

0 comments on commit c3cb831

Please sign in to comment.