jinja2_maps is a set of filters to display locations in Jinja2 templates.
Install
pip install jinja2_maps
Support
Service |
URL |
Map |
|---|---|---|
OpenStreetMap |
Yes |
Yes |
Google Maps |
Yes |
|
Apple Maps |
Yes |
|
Bing Maps |
Yes |
|
Mappy |
Yes |
Both Python 2.x and 3.x are supported.
Usage
All filters take a location as a dict with latitude and longitude keys. You can also pass an object with these attributes.
Before using any template you need to add the filters to your Jinja2 environment:
from jinja2_maps import activate_filters
activate_filters(your_env)
If using Flask you can do the following:
from jinja2_maps import activate_filters
activate_filters(app.jinja_env)
URLs
<a href="{{ your_location | osm_url }}">Check on OpenStreetMap</a>
<a href="{{ your_location | gmaps_url }}">Check on Google Maps</a>
<a href="{{ your_location | apple_maps_url }}">Check in Maps</a>
<a href="{{ your_location | bing_maps_url }}">Check on Bing Maps</a>
<a href="{{ your_location | mappy_url }}">Check on Mappy</a>
URLs also support giving the zoom level (default is 16):
<a href="{{ your_location | osm_url(zoom=12) }}">Check on OpenStreetMap</a>
Maps
{{ your_location | osm_map(width=500, height=400) }}
Metadata
Release files for jinja2_maps 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jinja2_maps-0.2.0.tar.gz | 5.2 kB | Without provenance | Details for jinja2_maps-0.2.0.tar.gz |
Release files / jinja2_maps-0.2.0.tar.gz
| Download URL | jinja2_maps-0.2.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e7a755540f4fb06ab97b23b885fc064667ad395b93474ef2b46a22e630f54d4
|
|
BLAKE2b-256 checksum How to use checksums |
2adb8a6419327b13355349981bdce6aeebe7e703f53b86fa3f80014c90cc731e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jinja2_maps 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.