Merge pull request #213 from joostschouppe/master

added campersites theme
This commit is contained in:
Pieter Vander Vennet 2021-03-15 15:57:59 +01:00 committed by GitHub
commit 21d07d81de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 662 additions and 2 deletions

View file

@ -21,6 +21,7 @@ import * as trees from "../assets/themes/trees/trees.json"
import * as personal from "../assets/themes/personalLayout/personalLayout.json" import * as personal from "../assets/themes/personalLayout/personalLayout.json"
import * as playgrounds from "../assets/themes/playgrounds/playgrounds.json" import * as playgrounds from "../assets/themes/playgrounds/playgrounds.json"
import * as bicycle_lib from "../assets/themes/bicycle_library/bicycle_library.json" import * as bicycle_lib from "../assets/themes/bicycle_library/bicycle_library.json"
import * as campersites from "../assets/themes/campersites/campersites.json"
import * as play_forests from "../assets/themes/play_forests/play_forests.json" import * as play_forests from "../assets/themes/play_forests/play_forests.json"
import * as speelplekken from "../assets/themes/speelplekken/speelplekken.json" import * as speelplekken from "../assets/themes/speelplekken/speelplekken.json"
import * as sport_pitches from "../assets/themes/sport_pitches/sport_pitches.json" import * as sport_pitches from "../assets/themes/sport_pitches/sport_pitches.json"
@ -73,6 +74,7 @@ export class AllKnownLayouts {
new LayoutConfig(climbing), new LayoutConfig(climbing),
new LayoutConfig(playgrounds), new LayoutConfig(playgrounds),
new LayoutConfig(trees), new LayoutConfig(trees),
new LayoutConfig(campersites),
new LayoutConfig(play_forests) , new LayoutConfig(play_forests) ,
new LayoutConfig(speelplekken), new LayoutConfig(speelplekken),
new LayoutConfig(sport_pitches) new LayoutConfig(sport_pitches)

View file

@ -56,8 +56,8 @@ The preferred way to add your theme is via a Pull Request. A Pull Request is les
- Make sure all the links in `yourtheme.json` are updated. You can use `./assets/themes/yourtheme/yourimage.svg` instead of the HTML link - Make sure all the links in `yourtheme.json` are updated. You can use `./assets/themes/yourtheme/yourimage.svg` instead of the HTML link
5) Add your theme to the code base: 5) Add your theme to the code base:
- Open [AllKnownLayouts.ts](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/AllKnownLayouts.ts) - Open [AllKnownLayouts.ts](https://github.com/pietervdvn/MapComplete/blob/master/Customizations/AllKnownLayouts.ts)
- Add an import statatement, e.g. `import * as yourtheme from "../assets/themes/yourtheme/yourthemes.json";` - Add an import statement, e.g. `import * as yourtheme from "../assets/themes/yourtheme/yourthemes.json";`
- Add your theme to the `LayoutList`, by adding a line `FromJSON.LayoutFromJSON(yourtheme)` - Add your theme to the `LayoutsList`, by adding a line `new LayoutConfig(yourtheme)`
6) Test your theme: run the project as described [above](../README.md#Dev) 6) Test your theme: run the project as described [above](../README.md#Dev)
7) Happy with your theme? Time to open a Pull Request! 7) Happy with your theme? Time to open a Pull Request!
8) Thanks a lot for improving MapComplete! 8) Thanks a lot for improving MapComplete!

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

View file

@ -0,0 +1,640 @@
{
"id": "campersite",
"title": {
"en": "Campersites"
},
"shortDescription": {
"en": "Find sites to spend the night with your camper"
},
"description": {
"en": "This site collects all official camper stopover places and places where you can dump grey and black water. You can add details about the services provided and the cost. Add pictures and reviews. This is a website and a webapp. The data is stored in OpenStreetMap, so it will be free forever and can be re-used by any app."
},
"language": [
"en"
],
"maintainer": "joost schouppe",
"icon": "./assets/themes/campersites/caravan.svg",
"version": "0",
"startLat": 43.14,
"startLon": 3.14,
"startZoom": 14,
"widenFactor": 0.05,
"socialImage": "./assets/themes/campersites/Bar%C3%9Fel_Wohnmobilstellplatz.jpg",
"layers": [
{
"id": "caravansites",
"name": {
"en": "Camper sites"
},
"minzoom": 12,
"overpassTags": {
"and": [
"tourism=caravan_site",
"permanent_camping!~only"
]
},
"title": {
"render": {
"en": "Camper site {name}"
},
"mappings": [
{
"if": {
"and": [
"name="
]
},
"then": {
"en": "Unnamed camper site"
}
}
]
},
"description": {
"en": "camper sites"
},
"tagRenderings": [
"images",
{
"render": {
"en": "This place is called {name}"
},
"question": {
"en": "What is this place called?"
},
"freeform": {
"key": "name"
}
},
{
"question": {
"en": "Does this place charge a fee?"
},
"mappings": [
{
"if": {
"and": [
"fee=yes"
]
},
"then": {
"en": "You need to pay for use"
}
},
{
"if": {
"and": [
"fee=no"
]
},
"then": {
"en": "Can be used for free"
}
}
]
},
{
"render": {
"en": "This place charges {charge}"
},
"question": {
"en": "How much does this place charge?"
},
"mappings": [],
"freeform": {
"key": "charge"
},
"condition": {
"and": [
"fee=yes"
]
}
},
{
"question": {
"en": "Does this place have a sanitary dump station?"
},
"mappings": [
{
"if": {
"and": [
"sanitary_dump_station=yes"
]
},
"then": {
"en": "This place has a sanitary dump station"
}
},
{
"if": {
"and": [
"sanitary_dump_station=no"
]
},
"then": {
"en": "This place does not have a sanitary dump station"
}
}
]
},
{
"render": {
"en": "{capacity} campers can use this place at the same time"
},
"question": {
"en": "How many campers can stay here? (skip if there is no obvious number of spaces or allowed vehicles)"
},
"freeform": {
"key": "capacity",
"type": "pnat"
}
},
{
"question": {
"en": "Does this place provide internet access?"
},
"mappings": [
{
"if": {
"and": [
"internet_access=yes"
]
},
"then": {
"en": "There is internet access"
}
},
{
"if": {
"or": [
"internet_access=wifi",
"internet_access=wlan"
]
},
"then": {
"en": "There is internet access"
},
"hideInAnswer": true
},
{
"if": {
"and": [
"internet_access=no"
]
},
"then": {
"en": "There is no internet access"
}
}
]
},
{
"question": {
"en": "Do you have to pay for the internet access?"
},
"mappings": [
{
"if": {
"and": [
"internet_access:fee=yes"
]
},
"then": {
"en": "You need to pay extra for internet access"
}
},
{
"if": {
"and": [
"internet_access:fee=no"
]
},
"then": {
"en": "You do not need to pay extra for internet access"
}
}
],
"condition": {
"and": [
"internet_access=yes"
]
}
},
{
"question": {
"en": "Does this place have toilets?"
},
"mappings": [
{
"if": {
"and": [
"toilets=yes"
]
},
"then": {
"en": "This place has toilets"
}
},
{
"if": {
"and": [
"toilets=no"
]
},
"then": {
"en": "This place does not have toilets"
}
}
]
},
{
"render": {
"en": "Official website: {website}"
},
"freeform": {
"type": "url",
"key": "website"
},
"question": {
"en": "Does this place have a website?"
}
},
{
"question": {
"en": "Does this place offer spots for long term rental?"
},
"mappings": [
{
"if": {
"and": [
"permanent_camping=yes"
]
},
"then": {
"en": "Yes, there are some spots for long term rental, but you can also stay on a daily basis"
}
},
{
"if": {
"and": [
"permanent_camping=no"
]
},
"then": {
"en": "No, there are no permanent guests here"
}
},
{
"if": {
"and": [
"permanent_camping=only"
]
},
"then": {
"en": "It is only possible to stay here if you have a long term contract(this place will disappear from this map if you choose this)"
}
}
]
},
{
"render": {
"en": "More details about this place: {description}"
},
"question": {
"en": "Would you like to add a general description of this place? (Do not repeat information previously asked or shown above. Please keep it objective - opinions go into the reviews)"
},
"freeform": {
"key": "description",
"type": "text"
}
},
"reviews"
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/campersites/caravan.svg",
"mappings": [
{
"if": {
"and": [
"fee=no"
]
},
"then": {
"en": "./assets/themes/campersites/caravan_green.svg"
}
}
]
},
"width": {
"render": "8"
},
"iconSize": {
"render": "40,40,center"
},
"color": {
"render": "#00f"
},
"presets": [
{
"tags": [
"tourism=caravan_site"
],
"title": {
"en": "camper site"
},
"description": {
"en": "Add a new official camper site. These are designated places to stay overnight with your camper. They might look like a real camping or just look like a parking. They might not be signposted at all, but just be defined in a municipal decision. A regular parking intended for campers where it is not expected to spend the night, is -not- a camper site "
}
}
],
"wayHandling": 2
},
{
"id": "dumpstations",
"name": {
"en": "Sanitary dump stations"
},
"minzoom": 12,
"overpassTags": {
"and": [
"amenity=sanitary_dump_station",
"vehicle!~no"
]
},
"title": {
"render": {
"en": "Dump station {name}"
},
"mappings": [
{
"if": {
"and": [
"name="
]
},
"then": {
"en": "Dump station"
}
}
]
},
"description": {
"en": "Sanitary dump stations"
},
"tagRenderings": [
"images",
{
"question": {
"en": "Does this place charge a fee?"
},
"mappings": [
{
"if": {
"and": [
"fee=yes"
]
},
"then": {
"en": "You need to pay for use"
}
},
{
"if": {
"and": [
"fee=no"
]
},
"then": {
"en": "Can be used for free"
}
}
]
},
{
"render": {
"en": "This place charges {charge}"
},
"question": {
"en": "How much does this place charge?"
},
"freeform": {
"key": "charge"
},
"condition": {
"and": [
"fee=yes"
]
}
},
{
"question": {
"en": "Does this place have a water point?"
},
"mappings": [
{
"if": {
"and": [
"water_point=yes"
]
},
"then": {
"en": "This place has a water point"
}
},
{
"if": {
"and": [
"water_point=no"
]
},
"then": {
"en": "This place does not have a water point"
}
}
]
},
{
"question": {
"en": "Can you dispose of grey water here?"
},
"mappings": [
{
"if": {
"and": [
"sanitary_dump_station:grey_water=yes"
]
},
"then": {
"en": "You can dispose of grey water here"
}
},
{
"if": {
"and": [
"sanitary_dump_station:grey_water=no"
]
},
"then": {
"en": "You cannot dispose of gray water here"
}
}
]
},
{
"question": {
"en": "Can you dispose of chemical toilet waste here?"
},
"mappings": [
{
"if": {
"and": [
"sanitary_dump_station:chemical_toilet=yes"
]
},
"then": {
"en": "You can dispose of chemical toilet waste here"
}
},
{
"if": {
"and": [
"sanitary_dump_station:chemical_toilet=no"
]
},
"then": {
"en": "You cannot dispose of chemical toilet waste here"
}
}
]
},
{
"question": {
"en": "Who can use this dump station?"
},
"mappings": [
{
"if": {
"and": [
"access=network"
]
},
"then": {
"en": "You need a network key/code to use this"
}
},
{
"if": {
"and": [
"access=customers"
]
},
"then": {
"en": "You need to be a customer of camping/campersite to use this place"
}
},
{
"if": {
"and": [
"access=public"
]
},
"then": {
"en": "Anyone can use this dump station"
},
"hideInAnswer": true
},
{
"if": {
"and": [
"access=yes"
]
},
"then": {
"en": "Anyone can use this dump station"
}
}
]
},
{
"render": {
"en": "This station is part of network {network}"
},
"question": {
"en": "What network is this place a part of? (skip if none)"
},
"freeform": {
"key": "network"
}
}
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/campersites/sanitary_dump_station.svg"
},
"width": {
"render": "8"
},
"iconSize": {
"render": "40,40,center"
},
"color": {
"render": "#00f"
},
"presets": [
{
"tags": [
"amenity=sanitary_dump_station"
],
"title": {
"en": "sanitary dump station"
},
"description": {
"en": "Add a new sanitary dump station. This is a place where camper drivers can dump waste water or chemical toilet waste. Often there's also drinking water and electricity."
}
}
]
}
],
"roamingRenderings": [
{
"render": {
"en": "This place is operated by {operator}"
},
"question": {
"en": "Who operates this place?"
},
"freeform": {
"key": "operator"
}
},
{
"question": {
"en": "Does this place have a power supply?"
},
"mappings": [
{
"if": {
"and": [
"power_supply=yes"
]
},
"then": {
"en": "This place has a power supply"
}
},
{
"if": {
"and": [
"power_supply=no"
]
},
"then": {
"en": "This place does not have power supply"
}
}
]
}
]
}

View file

@ -0,0 +1,3 @@
<svg width="580" height="580" viewBox="0 0 580 580" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M93.5013 130.791C67.4215 154.439 34.9075 176.106 34.9075 176.106V196.311L58.2504 217.497H194.705L194.337 242.889L137.211 243.388L94.579 317.915L34.9075 334.079V409.848H82.1874C82.1598 409.31 82.14 408.77 82.1283 408.231C82.1286 378.048 106.597 353.581 136.779 353.582C166.961 353.582 191.428 378.049 191.428 408.231C191.409 408.77 191.383 409.31 191.348 409.848H367.647C367.621 409.31 367.602 408.77 367.591 408.231C367.591 378.049 392.058 353.582 422.239 353.582C452.421 353.582 476.888 378.049 476.888 408.231C476.869 408.77 476.843 409.31 476.808 409.848H545.092V151.86H402.643L376.378 130.791H93.5013ZM100.407 155.883H194.705V195.887H100.407V155.883ZM386.808 217.497H481.103V289.646H386.808V217.497ZM266.436 217.497H347.159V386.441H266.436V217.497ZM153.749 267.263H194.285V318.624H126.075L153.749 267.263ZM422.239 373.252C402.921 373.252 387.261 388.913 387.261 408.231C387.261 427.549 402.921 443.209 422.239 443.209C441.557 443.209 457.217 427.549 457.218 408.231C457.217 388.913 441.557 373.252 422.239 373.252ZM136.779 373.756C117.74 373.756 102.305 389.191 102.305 408.231C102.305 427.271 117.74 442.705 136.779 442.705C155.818 442.704 171.251 427.269 171.251 408.231C171.251 389.192 155.818 373.757 136.779 373.756Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,3 @@
<svg width="580" height="580" viewBox="0 0 580 580" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M93.5013 130.791C67.4215 154.439 34.9075 176.106 34.9075 176.106V196.311L58.2504 217.497H194.705L194.337 242.889L137.211 243.388L94.579 317.915L34.9075 334.079V409.848H82.1874C82.1598 409.31 82.14 408.77 82.1283 408.231C82.1286 378.048 106.597 353.581 136.779 353.582C166.961 353.582 191.428 378.049 191.428 408.231C191.409 408.77 191.383 409.31 191.348 409.848H367.647C367.621 409.31 367.602 408.77 367.591 408.231C367.591 378.049 392.058 353.582 422.239 353.582C452.421 353.582 476.888 378.049 476.888 408.231C476.869 408.77 476.843 409.31 476.808 409.848H545.092V151.86H402.643L376.378 130.791H93.5013ZM100.407 155.883H194.705V195.887H100.407V155.883ZM386.808 217.497H481.103V289.646H386.808V217.497ZM266.436 217.497H347.159V386.441H266.436V217.497ZM153.749 267.263H194.285V318.624H126.075L153.749 267.263ZM422.239 373.252C402.921 373.252 387.261 388.913 387.261 408.231C387.261 427.549 402.921 443.209 422.239 443.209C441.557 443.209 457.217 427.549 457.218 408.231C457.217 388.913 441.557 373.252 422.239 373.252ZM136.779 373.756C117.74 373.756 102.305 389.191 102.305 408.231C102.305 427.271 117.74 442.705 136.779 442.705C155.818 442.704 171.251 427.269 171.251 408.231C171.251 389.192 155.818 373.757 136.779 373.756Z" fill="green"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,12 @@
<svg width="580" height="580" viewBox="0 0 580 580" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M77.1875 331.249H357.295V363.747H294.03V511.539H507.509V363.747H446.244V331.249H540.352V527.961C540.349 536.559 532.523 544.381 523.93 544.382H93.6089C85.0156 544.382 77.1891 536.559 77.1875 527.961V331.249Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M417.7 286.419V398.147H445.365L402.165 477.226L358.969 398.147H386.631V286.419H417.7Z" fill="black"/>
<path d="M87.8342 34.2837C67.5188 52.7046 42.1914 69.5826 42.1914 69.5826V85.3218L60.3748 101.825H166.668L166.382 121.604L121.883 121.993L88.6736 180.047L42.1914 192.639V251.66H79.021C78.9994 251.241 78.984 250.821 78.9749 250.4C78.9751 226.889 98.0352 207.83 121.546 207.831C145.057 207.831 164.116 226.89 164.116 250.4C164.101 250.821 164.08 251.241 164.054 251.66H301.385C301.364 251.241 301.349 250.821 301.341 250.4C301.341 226.89 320.4 207.831 343.911 207.831C367.421 207.831 386.48 226.89 386.48 250.4C386.465 250.821 386.445 251.241 386.418 251.66H439.609V50.696H328.646L308.186 34.2837H87.8342ZM93.2134 53.8294H166.668V84.9912H93.2134V53.8294ZM316.31 101.825H389.763V158.027H316.31V101.825ZM222.545 101.825H285.425V233.427H222.545V101.825ZM134.765 140.591H166.342V180.6H113.208L134.765 140.591ZM343.91 223.153C328.862 223.153 316.664 235.352 316.663 250.4C316.664 265.448 328.862 277.647 343.91 277.647C358.958 277.647 371.157 265.448 371.157 250.4C371.157 235.352 358.958 223.153 343.91 223.153ZM121.546 223.546C106.715 223.546 94.6917 235.569 94.692 250.4C94.6917 265.232 106.715 277.255 121.546 277.255C136.377 277.254 148.399 265.231 148.399 250.4C148.399 235.57 136.377 223.547 121.546 223.546Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0">
<path d="M0 0H580V580H0V0Z" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB