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

getting blank image in output #277

Open
pdpsinghr opened this issue May 21, 2024 · 0 comments
Open

getting blank image in output #277

pdpsinghr opened this issue May 21, 2024 · 0 comments

Comments

@pdpsinghr
Copy link

import mapnik
m = mapnik.Map(1024, 768, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs')
mapnik_xml_path = '/usr/share/renderd/example-map/xml/2024_05_20_07_amd.xml'
m.srs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
mapnik.load_map(m, mapnik_xml_path)
bbox = mapnik.Box2d(-122.4,37.8, -122.3, 37.9)
m.zoom_to_box(bbox)
img = mapnik.Image(1024, 768)
mapnik.render(m, img)
img.save('output_image.png')

this is my python code but in response i am getting blank image

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

No branches or pull requests

1 participant