Create static maps from some layers, pretty much like you do with openlayers but static and in python.
Installation
$ pip install mapas
Usage
from mapas import Map, Tile, Image, source
mapa = Map(
width=600,
height=400,
layers=[
Tile(source=source.Mapbox(
username='your-username',
style_id='some-style',
token='your-token',
)),
Image(source=source.ImageWms(
server_url="https://some.geoserver.com/wms",
layers=['your:layer'],
cql_filter="prop='value'",
)),
Image(source=source.ImageWms(
server_url="https://secured.geoserver.com/wms",
layers=['namespace:layer'],
auth=('user', 'password'),
)),
],
)
mapa.set_center(-96.10257, 19.13352)
mapa.set_zoom(18)
renderer = mapa.render()
renderer.save('mapa.png')
Run it and you’ll have a beautiful map at mapa.png.
Metadata
Release files for mapas 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mapas-1.3.1.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mapas-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.0 kB
Release files / mapas-1.3.1.tar.gz
| Download URL | mapas-1.3.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c0af63996f924654b8c893c57491059b6e93aacc33a64a01b4399e340bb4ca4
|
|
BLAKE2b-256 checksum How to use checksums |
3bb9886c858b5f2c8d31ca4ba976815c65d7d177b1e3c25e61a6a83403c5c957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / mapas-1.3.1-py3-none-any.whl
| Download URL | mapas-1.3.1-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41af655bd268ab3d1fb264df49ac368ef439b4a8a69fff3ba568f8addd8a3485
|
|
BLAKE2b-256 checksum How to use checksums |
6132e5d746909badf4eed3f96cc88794c795b923c74d01c4294bf2baef86df95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|