forked from MapComplete/MapComplete
Add search previews on the map
This commit is contained in:
parent
1c46a65c84
commit
4f52483a98
19 changed files with 315 additions and 87 deletions
66
assets/layers/search/search.json
Normal file
66
assets/layers/search/search.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"id": "search",
|
||||
"description": {
|
||||
"en": "Priviliged layer showing the search results"
|
||||
},
|
||||
"source": "special",
|
||||
"title": "{display_name}",
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "intro",
|
||||
"render": {
|
||||
"en": "Search result"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "osm",
|
||||
"render": {
|
||||
"*": "<a href='https://openstreetmap.org/{osm_type}/{osm_id}'>On OpenStreetMap</a>"
|
||||
}
|
||||
},
|
||||
"all_tags"
|
||||
],
|
||||
"pointRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"marker": [
|
||||
{
|
||||
"icon": "circle",
|
||||
"color": "white"
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"render": "globe_alt",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "category~city|locality|county",
|
||||
"then": "building_office_2"
|
||||
},
|
||||
{
|
||||
"if": "category=train_station",
|
||||
"then": "train"
|
||||
},
|
||||
{
|
||||
"if": "category=airport",
|
||||
"then": "airport"
|
||||
},
|
||||
{
|
||||
"if": "category=house",
|
||||
"then": "house"
|
||||
},
|
||||
{
|
||||
"if": "category=shop",
|
||||
"then": "building_storefront"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"label": "{display_name}",
|
||||
"labelCssClasses": "bg-white rounded p-2 no-wrap"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue