Following up on T300042 and based on the POC developed there, we want to allow properties for GeoPoints (example map with Geopoints + properties).
Possible properties
- icon type marker-symbol (list of available icons)
- color of the icon marker-color (hexadecimal color)
- size marker-size (large, medium, small)
Implementation
Steps:
- Set a fall back styling of markers when the user doesn't add any themselves.
- Allow users to set a default styling of the markers outside of the sparql query, similar to geoshapes.
- Allow users to to define properties for geopoints (e.g. title, description, maybe image) as part of the sparql query (the same way as for geoshapes: example output).
Open questions
- UI/UX: What should be the default styling look like (see above for options)? The current one looks like this:
How to tech review
Set enableGeopoints: true in the config.docker.yaml file.
Here are my test queries for geopoints and shapes:
<mapframe text="Churches in Jerusalem via sparql" width="300" height="300" zoom="5" longitude="31.77917" latitude="35.22361" align="center">
{
"type": "ExternalData",
"service": "geopoint",
"query": "SELECT DISTINCT ?id ?geo (IF(?language = wd:Q56473, '#000080', IF(?language = wd:Q56469, '#008000', '#800000')) AS ?marker_color) WHERE { ?id wdt:P31 wd:Q193560; wdt:P625 ?geo; wdt:P2936 ?language.} LIMIT 2"
}
</mapframe>
<mapframe text="Geoshapes in Israel via sparql" width="300" height="300" zoom="5" longitude="31.77917" latitude="35.22361" align="center">
{
"type": "ExternalData",
"service": "geoshape",
"query": "SELECT DISTINCT ?id (IF(?language = wd:Q56473, '#000080', IF(?language = wd:Q56469, '#008000', '#800000')) AS ?fill) WHERE { ?id wdt:P31 wd:Q193560; wdt:P2936 ?language.} LIMIT 2",
"properties": {
"stroke": "#ffb100",
"stroke-width": 6
}
}
</mapframe>