Skip to content

Commit

Permalink
Update version to v0.18.3
Browse files Browse the repository at this point in the history
  • Loading branch information
henhuy committed Mar 1, 2024
1 parent 43e2630 commit cc4a61f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and the versioning aim to respect [Semantic Versioning](http://semver.org/spec/v

Here is a template for new release sections

## [0.18.3] - 2024-03-01
### Fixed
- popups above choropleths

## [0.18.2] - 2024-02-20
### Fixed
- version check at image loading
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Django-Mapengine

`django-mapengine` is a Django app to provide library for maplibre in backend.
`django-mapengine` is a Django app to provide library for maplibre in backend.
This includes
- html templates and JS files for maplibre
- creation of maplibre sources and layers including choropleths,
- html templates and JS files for maplibre
- creation of maplibre sources and layers including choropleths,
- provision of multi-vector-tiles from django models,
- distilling of map source views
- basic popups
Expand Down Expand Up @@ -34,7 +34,7 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
path("map/", include("django_mapengine.urls")),
]
```

4. Configure map engine by setting zoom levels, regions and styles folder in project settings.py.
You can see all possible settings by looking into `django_mapengine.settings.py`.
Example settings:
Expand All @@ -45,9 +45,9 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
MAP_ENGINE_CENTER_AT_STARTUP = [12.537917858911896, 51.80812518969171]
MAP_ENGINE_ZOOM_AT_STARTUP = 9
MAP_ENGINE_MAX_BOUNDS = [[11.280733017118229, 51.22918643452503], [13.616574868700604, 52.35515806663738]]

MAP_ENGINE_IMAGES = [core.MapImage("wind", "images/icons/i_wind.png")]

MAP_ENGINE_API_MVTS = {
"municipality":
[
Expand All @@ -56,7 +56,7 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
],
"results": [setup.MVTAPI("results", "map", "Municipality")]
}

MAP_ENGINE_API_CLUSTERS = [
setup.ClusterAPI("wind", "map", "WindTurbine"),
setup.ClusterAPI("pvroof", "map", "PVroof"),
Expand All @@ -65,15 +65,15 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
setup.ClusterAPI("biomass", "map", "Biomass"),
setup.ClusterAPI("combustion", "map", "Combustion"),
]

MAP_ENGINE_STYLES_FOLDER = "digiplan/static/config/"
MAP_ENGINE_ZOOM_LEVELS = {
"municipality": core.Zoom(8, 12),
}

MAP_ENGINE_POPUPS = ["results"]
```

5. Add maplibre-gl, pubsub-js and mapengine JS, CSS and JSONs in template by:
```html
{% block javascript %}
Expand All @@ -83,14 +83,14 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
<script src="{% static 'vendors/pubsub/js/pubsub.js' %}"></script>
{% endcompress %}
{% endblock javascript %}

{% block inline_javascript %}
{% include 'django_mapengine/map_json.html' %}
{% include 'django_mapengine/map_json.html' %}
{% compress js %}
{% include 'django_mapengine/map_js.html' %}
{% endcompress %}
{% endblock %}

{% block css %}
{% compress css %}
<link href="{% static 'vendors/maplibre/css/maplibre-gl.css' %}" rel='stylesheet'/>
Expand All @@ -103,4 +103,3 @@ Maplibre must be installed (i.e. via npm) and provided as JS framework
<script src="{% static 'django_mapengine/js/basemaps.js' %}" type="text/javascript"></script>
{% include 'django_mapengine/map_basemaps.html'}
```

2 changes: 1 addition & 1 deletion django_mapengine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Map Engine init, holds version"""

__version__ = "0.18.2"
__version__ = "0.18.3"
2 changes: 1 addition & 1 deletion django_mapengine/templates/django_mapengine/map_json.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
{{ mapengine_images|json_script:"mapengine_images" }}
{{ mapengine_popups|json_script:"mapengine_popups" }}
{{ mapengine_layers_at_startup|json_script:"mapengine_layers_at_startup" }}
{{ mapengine_store_cold_init|json_script:"mapengine_store_cold_init" }}
{{ mapengine_store_cold_init|json_script:"mapengine_store_cold_init" }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-mapengine"
version = "0.18.2"
version = "0.18.3"
description = "Map engine for maplibre in django"
authors = ["Hendrik Huyskens <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit cc4a61f

Please sign in to comment.