Our places.
Our priorities.
One search.

Pelias turns several place datasets into one searchable index. LiveMap controls which collections get extra attention—and how they appear.

Local sponsored placements: at most three matching branches within 1 km of the map center, nearest first. The general search-radius slider still controls ordinary results. A specific named-place match stays first. Moving the map refreshes the search; Show more does not add extra sponsored slots.
01

The ingredients

OpenStreetMap

Addresses, places & landmarks

Swiss PBF → regional polygon extract. Named landmarks use their own layer.

openstreetmap
Who's On First

Geographic context

Swiss administrative places and postcodes. Lookup services help attach place hierarchy.

whosonfirst
Street polylines

Street names & geometry

Prepared from OSM for the Pelias polyline importer.

street
Overture Maps

Points of interest

Places download → regional filtering → Pelias CSV.

overture
Swiss public transport

Stops & stations

Official service points → normalized nationwide CSV.

pt
Two custom collections

A scoop. A pretzel.

Overture ice cream shops + the official Valora Brezelkönig location feed.

icecreambrezelkoenig
02

From source to searchable place

Ice cream collection

Select ice_cream_shop from the existing Overture CSV. Add address and locality from the original place records.

Brezelkönig collection

Fetch Swiss stores from Valora. Keep stable store IDs, names, coordinates, address and regular weekly hours.

Normalize & validate

Require ID + name + valid Swiss bounding-box coordinates. Give each collection its own Pelias source.

scripts/build-demo-collections.py

Search records → Elasticsearch

demo-collections.csv → Pelias CSV importer → refresh index → restart API.

idsourcelayernamelat / lonscripts/45-import-demo.sh

Collection catalog → browser

frontend/demo-collections.json enriches returned API features by their IDs with addresses, hours and card type.

For category browsing, this small catalog also selects IDs by distance. Pelias /place must return each indexed record before it appears. Named search candidates come from Pelias.

03

Priority has two controls

A · Pelias relevance

Source and layer boosts

These weights influence the API's score. They are not guaranteed positions.

Brezelkönig
5
Ice cream
8
Landmark layer
3
Public transport
2
templates/pelias.json → api.customBoosts
B · Demo presentation

Explicit collection placement

After ranking and deduplication, collections lead category searches. Exact name matches lead named searches:

1. Matching sponsor branchesAll loaded matches
2. Ice cream matchesThemed cards
3. Other matching placesOrdinary results
frontend/demo-search.js → merge()
The collection toggles control dedicated demo-source results. They do not rewrite server boosts. Generic pretzel searches use the official feed for Brezelkönig branches and add other pretzel businesses from OSM and Overture.
04

What happens when you search

Type a query

Normal Pelias search or autocomplete uses the map center and the radius slider. An explicit recognized category locality supplies its own center.

Ask the collections

A category request selects all collection IDs within the radius and retrieves indexed records through /place in batches of 40. Named collection requests use autocomplete.

Merge & dress

Enrich metadata, remove duplicates and order the groups. Show 12 initially, with “Show more” revealing another 12 cards and pins.

Ice cream vocabulary

ice cream · icecream · gelato · gelati · glace · glaces · eis · eiscreme

Pretzel vocabulary

pretzel · pretzels · brezel · brezeln · brezelkönig · brezelkoenig

Category recognition requires a listed term, optionally followed by a locality in the catalog, ignoring accents and case. The center is the map center, or the first catalog record in that locality—not a municipal centroid. Results from collection queries are ordered by distance to their search center. The live radius slider (1–100 km; default 25 km) bounds ordinary and collection queries; reverse search is unchanged.

Ordinary matches stay in the list. Pretzel categories also query pretzel, brezel and bretzel in OSM/Overture. Ordinary and named requests fetch up to 100 results per query; “Show more” pages the loaded set, not the entire database.

Duplicate rule: identical Pelias GID, or the same normalized name within 100 metres. This is a simple demo heuristic; nearby branches with different names remain separate.
05

Add a source. Give it a voice.

Map the source

Extend scripts/build-demo-collections.py with a stable source ID, record ID, name, coordinates and category. Emit CSV search records and JSON display metadata.

Register it with Pelias

In templates/pelias.json, add the source/layer pair under api.targets.layers_by_source. Set its weight in api.customBoosts.source.

Define its search behavior

Extend frontend/demo-search.js for source mapping, category vocabulary and placement. Add the source and toggle to collection query selection in frontend/index.html.

Make the card belong

Add the new kind to frontend/demo-cards.js and its visual treatment to frontend/demo-cards.css. Keep paid/demo placement clearly disclosed.

Regenerate, import, verify

From the livemap-search repository, with the local index and existing Switzerland extract available:

scripts/45-import-demo.sh switzerland

The script renders configuration, rebuilds collection files, imports the demo CSV, refreshes Elasticsearch and restarts the API.

Check both layers

Query the API with the new sources value. Then search by name and category in the UI, toggle the collection, and verify card, pin and ranking.

For a weight-only change, render config with scripts/10-render-config.sh switzerland and restart the API with bash -c 'source scripts/common.sh switzerland; compose restart api'. No reimport is needed for a score change.

06

The demo boundary

Runs in this local app

Local data generation, Elasticsearch import, API configuration and browser presentation are separate pieces. Changing this checkout does not deploy a shared environment.

“Sponsored · Demo” means exactly that

Real locations and official brand artwork; illustrative placement. No commercial partnership is implied. Public feed access is not an open-data license; reuse rights need review before deployment.

Displayed hours are regular weekly hours. Special-day schedules can differ.