komoot / staticmap

A small, python-based library for creating map images with lines, markers and polygons.
https://www.komoot.com
Other
290 stars 65 forks source link

How to import the module #2

Closed jeantristan closed 8 years ago

jeantristan commented 8 years ago

I installed the module but I'm not able to use it. Coud you help me please ?

In [1]: import staticmap

In [2]: staticmap.StaticMap(300,400,10)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-f766ae52cee2> in <module>()
----> 1 staticmap.StaticMap(300,400,10)

AttributeError: 'module' object has no attribute 'StaticMap'
christophlingg commented 8 years ago

it's

staticmap.staticmap.StaticMap()

which is not very elegant I admit. I saw that popular packages introduce shortcuts which are very handy. I'll add them too. Your code should work as as well in the future.

christophlingg commented 8 years ago

the current version of staticmap 0.4.7 supports those shortcuts