Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def draw(self):
ax = plot.ax
if len(self.df.geometry) == 0:
return ax
basemap, extent = ctx.bounds2img(
*self._webmap_extent, zoom=self.zoom,
url=getattr(ctx.sources, provider), ll=True
)
extent = (extent[0], extent[1], extent[3], extent[2])
ax.imshow(basemap, extent=extent, interpolation='bilinear')
return ax