forked from MapComplete/MapComplete
refactoring(maplibre): WIP
This commit is contained in:
parent
231d67361e
commit
4d48b1cf2b
89 changed files with 1166 additions and 3973 deletions
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"id": "cluster_style",
|
||||
"description": "The style for the clustering in all themes. Enable `debug=true` to peak into clustered tiles",
|
||||
"source": {
|
||||
"osmTags": "tileId~*"
|
||||
},
|
||||
"title": "Clustered data",
|
||||
"tagRenderings": [
|
||||
"all_tags"
|
||||
],
|
||||
"mapRendering": [
|
||||
{
|
||||
"label": {
|
||||
"render": "<div class='rounded-full text-xl font-bold' style='width: 2rem; height: 2rem; background: white'>{showCount}</div>",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "showCount>1000",
|
||||
"then": "<div class='rounded-full text-xl font-bold flex flex-col' style='width: 2.5rem; height: 2.5rem; background: white'>{kilocount}K</div>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"location": [
|
||||
"point"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": {
|
||||
"render": "#3c3",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "showCount>200",
|
||||
"then": "#f33"
|
||||
},
|
||||
{
|
||||
"if": "showCount>100",
|
||||
"then": "#c93"
|
||||
},
|
||||
{
|
||||
"if": "showCount>50",
|
||||
"then": "#cc3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"render": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,14 +2,7 @@
|
|||
"id": "conflation",
|
||||
"description": "If the import-button moves OSM points, the imported way points or conflates, a preview is shown. This layer defines how this preview is rendered. This layer cannot be included in a theme.",
|
||||
"minzoom": 1,
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"move=yes",
|
||||
"newpoint=yes"
|
||||
]
|
||||
}
|
||||
},
|
||||
"source": "special",
|
||||
"name": "Conflation",
|
||||
"title": "Conflation",
|
||||
"mapRendering": [
|
||||
|
@ -86,4 +79,4 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"id": "current_view",
|
||||
"description": "A meta-layer which contains one single feature, namely the BBOX of the current map view. This can be used to trigger special actions. If a popup is defined for this layer, this popup will be accessible via an extra button on screen.\n\nThe icon on the button is the default icon of the layer, but can be customized by detecting 'button=yes'.",
|
||||
"source": {
|
||||
"osmTags": "current_view=yes",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source": "special",
|
||||
"shownByDefault": false,
|
||||
"title": "Current View",
|
||||
"tagRenderings": [],
|
||||
|
@ -13,4 +10,4 @@
|
|||
"color": "#cccc0088"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
"id": "filters",
|
||||
"description": "This layer acts as library for common filters",
|
||||
"mapRendering": null,
|
||||
"source": {
|
||||
"osmTags": "id~*"
|
||||
},
|
||||
"source": "special:library",
|
||||
"filter": [
|
||||
{
|
||||
"id": "open_now",
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
"id": "gps_location",
|
||||
"description": "Meta layer showing the current location of the user. Add this to your theme and override the icon to change the appearance of the current location. The object will always have `id=gps` and will have _all_ the properties included in the [`Coordinates`-object](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates) returned by the browser.",
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
"osmTags": "id=gps",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source": "special",
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
|
@ -38,4 +35,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,7 @@
|
|||
"description": "Meta layer which contains the previous locations of the user as single points. This is mainly for technical reasons, e.g. to keep match the distance to the modified object",
|
||||
"minzoom": 1,
|
||||
"name": null,
|
||||
"source": {
|
||||
"osmTags": "user:location=yes",
|
||||
"#": "Cache is disabled here as these points are kept seperately",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source": "special",
|
||||
"shownByDefault": false,
|
||||
"mapRendering": [
|
||||
{
|
||||
|
@ -19,4 +15,4 @@
|
|||
"iconSize": "5,5,center"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
"id": "gps_track",
|
||||
"description": "Meta layer showing the previous locations of the user as single line with controls, e.g. to erase, upload or download this track. Add this to your theme and override the maprendering to change the appearance of the travelled track.",
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
"osmTags": "id=location_track",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source": "special",
|
||||
"title": {
|
||||
"render": "Your travelled path"
|
||||
},
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
"id": "home_location",
|
||||
"description": "Meta layer showing the home location of the user. The home location can be set in the [profile settings](https://www.openstreetmap.org/profile/edit) of OpenStreetMap.",
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
"osmTags": "user:home=yes",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source":"special",
|
||||
"mapRendering": [
|
||||
{
|
||||
"icon": {
|
||||
|
@ -20,4 +17,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
"description": {
|
||||
"en": "A layer acting as library for icon-tagrenderings, especially to show as badge next to a POI"
|
||||
},
|
||||
"source": {
|
||||
"osmTags": "id~*"
|
||||
},
|
||||
"source":"special:library",
|
||||
"title": null,
|
||||
"tagRenderings": [
|
||||
{
|
||||
|
@ -127,4 +125,4 @@
|
|||
}
|
||||
],
|
||||
"mapRendering": null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"en": "Layer containing various presets and questions generated by ID. These are meant to be reused in other layers by importing the tagRenderings with `id_preset.<tagrendering>"
|
||||
},
|
||||
"#dont-translate": "*",
|
||||
"source": {
|
||||
"osmTags": "id~*"
|
||||
},
|
||||
"source": "special:library",
|
||||
"title": null,
|
||||
"mapRendering": null,
|
||||
"tagRenderings": [
|
||||
|
@ -20217,4 +20215,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
"id": "import_candidate",
|
||||
"description": "Layer used in the importHelper",
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and": []
|
||||
}
|
||||
},
|
||||
"source":"special",
|
||||
"mapRendering": [
|
||||
{
|
||||
"location": [
|
||||
|
@ -23,4 +19,4 @@
|
|||
"render": "{all_tags()}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"id": "left_right_style",
|
||||
"description": "Special meta-style which will show one single line, either on the left or on the right depending on the id. This is used in the small popups with left_right roads. Cannot be included in a theme",
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"id=left",
|
||||
"id=right"
|
||||
]
|
||||
}
|
||||
},
|
||||
"mapRendering": [
|
||||
{
|
||||
"width": 15,
|
||||
"color": {
|
||||
"render": "#ff000088",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "id=left",
|
||||
"then": "#0000ff88"
|
||||
}
|
||||
]
|
||||
},
|
||||
"offset": {
|
||||
"render": "-15",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "id=right",
|
||||
"then": "15"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
"id": "matchpoint",
|
||||
"description": "The default rendering for a locationInput which snaps onto another object",
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and": []
|
||||
}
|
||||
},
|
||||
"source":"special",
|
||||
"mapRendering": [
|
||||
{
|
||||
"location": [
|
||||
|
@ -15,4 +11,4 @@
|
|||
"icon": "./assets/svg/crosshair-empty.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
14
assets/layers/range/range.json
Normal file
14
assets/layers/range/range.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"id": "range",
|
||||
"description": "Meta-layer, simply showing a bbox in red",
|
||||
"title": null,
|
||||
"source": "special",
|
||||
"name": null,
|
||||
"mapRendering": [
|
||||
{
|
||||
"width": 4,
|
||||
"fill": "no",
|
||||
"color": "#ff000088"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,12 +2,9 @@
|
|||
"id": "type_node",
|
||||
"description": "This is a priviliged meta_layer which exports _every_ point in OSM. This only works if zoomed below the point that the full tile is loaded (and not loaded via Overpass). Note that this point will also contain a property `parent_ways` which contains all the ways this node is part of as a list. This is mainly used for extremely specialized themes, which do advanced conflations. Expert use only.",
|
||||
"minzoom": 18,
|
||||
"source": {
|
||||
"osmTags": "id~node/.*",
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"source": "special",
|
||||
"mapRendering": null,
|
||||
"name": "All OSM Nodes",
|
||||
"title": "OSM node {id}",
|
||||
"tagRendering": []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
"nl": "Een speciale lag die niet getoond wordt op de kaart, maar die de instellingen van de gebruiker weergeeft"
|
||||
},
|
||||
"title": null,
|
||||
"source": {
|
||||
"osmTags": "id~*"
|
||||
},
|
||||
"source": "special",
|
||||
"calculatedTags": [
|
||||
"_mastodon_candidate_md=feat.properties._description.match(/\\[[^\\]]*\\]\\((.*(mastodon|en.osm.town).*)\\).*/)?.at(1)",
|
||||
"_d=feat.properties._description?.replace(/</g,'<')?.replace(/>/g,'>') ?? ''",
|
||||
|
@ -320,4 +318,4 @@
|
|||
}
|
||||
],
|
||||
"mapRendering": null
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue