diff --git a/examples/custom_objects.py b/examples/custom_objects.py index 91487d6..e1da4b7 100644 --- a/examples/custom_objects.py +++ b/examples/custom_objects.py @@ -37,7 +37,9 @@ def render_pillow(self, renderer: staticmaps.PillowRenderer) -> None: x, y = renderer.transformer().ll2pixel(self.latlng()) x = x + renderer.offset_x() - tw, th = renderer.draw().textsize(self._text) + left, top, right, bottom = renderer.draw().textbbox((0, 0), self._text) + th = bottom - top + tw = right - left w = max(self._arrow, tw + 2 * self._margin) h = th + 2 * self._margin diff --git a/examples/frankfurt_newyork.py b/examples/frankfurt_newyork.py index de7bb86..5bae610 100644 --- a/examples/frankfurt_newyork.py +++ b/examples/frankfurt_newyork.py @@ -6,7 +6,7 @@ import staticmaps context = staticmaps.Context() -context.set_tile_provider(staticmaps.tile_provider_StamenToner) +context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery) frankfurt = staticmaps.create_latlng(50.110644, 8.682092) newyork = staticmaps.create_latlng(40.712728, -74.006015) diff --git a/examples/geodesic_circles.py b/examples/geodesic_circles.py index 9cd90da..805a867 100644 --- a/examples/geodesic_circles.py +++ b/examples/geodesic_circles.py @@ -6,7 +6,7 @@ import staticmaps context = staticmaps.Context() -context.set_tile_provider(staticmaps.tile_provider_StamenToner) +context.set_tile_provider(staticmaps.tile_provider_OSM) center1 = staticmaps.create_latlng(66, 0) center2 = staticmaps.create_latlng(0, 0)