Create static maps from different layers
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mapas-1.3.1.tar.gz
(7.9 kB
view details)
Built Distribution
mapas-1.3.1-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file mapas-1.3.1.tar.gz
.
File metadata
- Download URL: mapas-1.3.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0af63996f924654b8c893c57491059b6e93aacc33a64a01b4399e340bb4ca4 |
|
MD5 | f18a4d7deb0992334ff5cb5c4ae38d21 |
|
BLAKE2b-256 | 3bb9886c858b5f2c8d31ca4ba976815c65d7d177b1e3c25e61a6a83403c5c957 |
File details
Details for the file mapas-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: mapas-1.3.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41af655bd268ab3d1fb264df49ac368ef439b4a8a69fff3ba568f8addd8a3485 |
|
MD5 | 31acc5712b8f2dfbdca7f876187d9159 |
|
BLAKE2b-256 | 6132e5d746909badf4eed3f96cc88794c795b923c74d01c4294bf2baef86df95 |