from wtforms.widgets import TextArea
def lat(pt):
return getattr(pt, "lat", getattr(pt, "x", pt[0]))
def lng(pt):
return getattr(pt, "lng", getattr(pt, "y", pt[1]))
class LeafletWidget(TextArea):
data_role = 'leaflet'
"""
`Leaflet `_ styled map widget. Inherits from
`TextArea` so that geographic data can be stored via the