The Arlington Players' production of Stephen Sondheim's A Little Night Music comes to the Kogod Cradle at The Mead Center for American Theater (1101 6th Street SW) this weekend and next. 8:00 p.m.
geometry:
type: Point
coordinates: [4.300, 50.800]
```
Collection of features:
```
geojson:
type: FeatureCollection
features:
-
type: Feature
properties:
description: "A Little Night Music
The Arlington Players' production of Stephen Sondheim's A Little Night Music comes to the Kogod Cradle at The Mead Center for American Theater (1101 6th Street SW) this weekend and next. 8:00 p.m.
\n"
geometry:
type: Point
coordinates: [4.376, - 50.83012]
-
type: Feature
...
```
#### GeoJSON data in a JSON file
The `geojson` attribute in the YAML frontmatter can also contain a URL with `.json` extension.
Example:
```
geojson: /post-locations.json`
```
The linked file can be a static file on the same host or another server. If the data source points to a generated file capturing the `location` attribute of posts, Jekyll MapLibre can display maps with post markers.
Example for `/post-locations.json`:
```
{% assign posts = site.posts | where_exp:"location", "location != nil" %}
{
"type": "FeatureCollection",
"features": [
{% for post in posts limit:20 %}
{
"type": "Feature",
"properties": {
"description": "{{post.title}} {{post.description}} "
},
"geometry": {
"type": "Point",
"coordinates": {{post.location | jsonify }}
}
}{% unless forloop.last %},{% endif %}
{% endfor %}
]
}
```
With `where` and `where_exp` (see [documentation](https://jekyllrb.com/docs/liquid/filters/)), Jekyll permits to implement various filters.
### Marker Cluster
Clusters are enabled by default. Use the flag `no_cluster` in the tag to disable clusters.
## Examples
Want to see Jekyll MapLibre in action? Check out [Demo Page](https://ayastreb.me/jekyll-maps/#examples)!
## Contributing
1. Fork it (https://github.com/rriemann/jekyll-maplibre/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## TODOs
The following issues and limitation require contribution:
- implement random SVG markers, see: ,
- implement more than one map tag per page
- add more examples on how to generate geojson data from Jekyll collections/data.
- Jekyll-Maps has spec tests (still in this repo) – make them work again with Jekyll MapLibre
- add flag to switch popups to open by default (without click to open)
## Similar Software
-
-
-
## Contributors
- Anatoliy Yastreb (as the author of the forked Jekyll Maps gem)
- Robert Riemann
## License
[MIT](https://github.com/rriemann/jekyll-maplibre/blob/master/LICENSE). Feel free to use, copy or
distribute it.