Closed Lohorunk closed 1 year ago
Hello hiikion,
I don't know why, but when You add an object instead of setting the centre, it works, e.g.:
import staticmaps
import s2sphere
context = staticmaps.Context()
context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery)
helsinki = staticmaps.create_latlng(60.169320, 24.952011)
context.add_object(staticmaps.Marker(helsinki, color=staticmaps.GREEN, size=12))
context.set_zoom(15)
image = context.render_pillow(500, 500)
image.show()
Hello hiikion,
I don't know why, but when You add an object instead of setting the centre, it works, e.g.:
import staticmaps import s2sphere context = staticmaps.Context() context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery) helsinki = staticmaps.create_latlng(60.169320, 24.952011) context.add_object(staticmaps.Marker(helsinki, color=staticmaps.GREEN, size=12)) context.set_zoom(15) image = context.render_pillow(500, 500) image.show()
Any way of getting a clear image without markers?
Hello hiikion,
replace the line
context.set_center(s2sphere.LatLng(60.169320, 24.952011))
with
context.set_center(staticmaps.create_latlng(60.169320, 24.952011))
and it works ...
it works, thanks.
Just for completeness, the following would also work:
context.set_center(s2sphere.LatLng.from_degrees(60.169320, 24.952011))
Im trying to get a satellite image with specific center coordinates and zoom via staticmaps
But i get the following error:
However if i use different coordinates "51.230372, 6.787148" (Düsseldorf) It works, but It is a completely different place