Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data = o["datasource"].getData()
for key,value in data.items():
lat = value[o["lat"]]
lon = value[o["lon"]]
radius = 50
if "radius" in o:
radius = o["radius"]
elif "radius_field" in o:
num = float(value[o["radius_field"]])
radius = int(num)
circle = maps.Circle(location=(lat,lon),radius=radius)
borderWidth = self.getOpt("circle_border_width",2)
circle.weight = borderWidth
if borderWidth > 0:
circle.stroke = True
circle.color = self.getOpt("circle_border_color","black")
else:
circle.stroke = False
circle.fill_color = self.getOpt("circle_fill_color","white")
circle.fill_opacity = self.getOpt("circle_fill_opacity",.2)
if "text" in o:
text = value[o["text"]]
circle.popup = widgets.HTML(value=text)