Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for explicit-boundary blank maps #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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
Member

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