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 c02e5e5 commit 59fc900
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 45 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 @@ -30,7 +30,6 @@
"vite-plugin-wasm-pack": "^0.1.12"
},
"dependencies": {
"@maptiler/geocoding-control": "^1.1.1",
"@turf/bbox": "^6.5.0",
"maplibre-draw-polygon": "github:dabreegster/maplibre-draw-polygon",
"maplibre-gl": "^4.1.0",
Expand Down
34 changes: 0 additions & 34 deletions web/src/common/Geocoder.svelte

This file was deleted.

2 changes: 2 additions & 0 deletions web/src/common/Map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import type { Map, StyleSpecification } from "maplibre-gl";
import { map as mapStore, basemap, maptilerApiKey } from "./store";
import { PolygonToolLayer } from "maplibre-draw-polygon";
import { Geocoder } from "svelte-utils";
let map: Map;
let loaded = false;
Expand Down Expand Up @@ -39,6 +40,7 @@
<ScaleControl />
<NavigationControl position="bottom-right" visualizePitch />
<PolygonToolLayer />
<Geocoder {map} apiKey={maptilerApiKey} />
<slot />
{/if}
</MapLibre>
Expand Down
1 change: 0 additions & 1 deletion web/src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { default as BasemapPicker } from "./BasemapPicker.svelte";
export { default as Geocoder } from "./Geocoder.svelte";
export { default as Layout } from "./Layout.svelte";
export { default as Map } from "./Map.svelte";
export { default as StreetView } from "./StreetView.svelte";
Expand Down
3 changes: 1 addition & 2 deletions web/src/lane-editor/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import init from "osm2streets-js";
import { onMount } from "svelte";
import AppSwitcher from "../AppSwitcher.svelte";
import { Geocoder, Layout, Map } from "../common";
import { Layout, Map } from "../common";
import ImportControls from "../common/import/ImportControls.svelte";
import EditWayControls from "./EditWayControls.svelte";
import RenderBoundary from "../common/layers/RenderBoundary.svelte";
Expand Down Expand Up @@ -96,7 +96,6 @@
/>
</GeoJSON>
</div>
<Geocoder />
</Map>
</div>
</Layout>
2 changes: 0 additions & 2 deletions web/src/street-explorer/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
StreetView,
ThemePicker,
BasemapPicker,
Geocoder,
Layout,
Map,
} from "../common";
Expand Down Expand Up @@ -106,7 +105,6 @@
<ThemePicker />
<StreetView />
</div>
<Geocoder />
</Map>
</div>
</Layout>
Expand Down

0 comments on commit 59fc900

Please sign in to comment.