New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mapas

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapas

Create static maps from different layers

  • 1.3.1
  • PyPI
  • Socket score

Maintainers
1

Mapas

Create static maps from some layers, pretty much like you do with openlayers but static and in python.

Installation

.. code:: bash

$ pip install mapas

Usage

.. code:: python

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc