Skip to content

Conversation

@maxvonhippel
Copy link

You can now create blank maps by setting an explicit extent. To be clear, I have only added explicit extent support for blank maps. Non-blank ones are more difficult (and frankly not a feature I currently need), but if someone else wants to give it a go I'm sure it would be a good feature to have.

Here is an example, which I tested and which works:

_map = StaticMap(500, 500, url_template='http://a.tile.osm.org/{z}/{x}/{y}.png')
_map.set_extent(83.676659, 28.220671, 83.804604, 28.409901)
_img = _map.render(zoom=5)
_img.save("boxtest.png")

@maxvonhippel
Copy link
Author

(addresses issue 3 and 4)

@christophlingg
Copy link
Contributor

Thanks @maxvonhippel for this request, I haven't seen it earlier that's why I respond that late.

I can understand your use case and I am sure others will need this feature too. however I think there is an easier approach to accomplish it, with the features already implemented in this library.

Only a tiny change is needed see #10

Do you think this would work out for you too?

@christophlingg christophlingg mentioned this pull request Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants