Skip to content

Commit df18dfb

Browse files
committed
Initial version
0 parents  commit df18dfb

15 files changed

+2583
-0
lines changed

.github/workflows/test-and-build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build
28+
run: npm run build

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Vue Place Search
2+
3+
Vue3 place search for Austria, using the [BEV Kataster](https://kataster.bev.gv.at/) API.
4+
5+
## Usage
6+
7+
npm install @w3geo/vue-place-search
8+
9+
### `result` event
10+
11+
```html
12+
<template>
13+
<PlaceSearch @result="showResult" />
14+
</template>
15+
<script setup>
16+
import { PlaceSearch } from '@w3geo/vue-place-search';
17+
18+
function showResult(result) {
19+
console.log(result); // Output will be a GeoJSON feature
20+
}
21+
</script>
22+
```
23+
24+
### `usePlaceSearch` composable for OpenLayers
25+
```html
26+
<script setup>
27+
import { usePlaceSearch } from '@w3geo/vue-place-search';
28+
// Your composable that provides an OpenLayers map:
29+
import { useMap } from './composables/useMap.js';
30+
31+
const map = useMap();
32+
usePlaceSearch(map);
33+
</script>
34+
```
35+
With this, the map view will automatically be centered on the result geometry.

0 commit comments

Comments
 (0)