__init__(self,
levels=None,
required_levels=None,
hide_lx=True,
reverse_lx=False,
show_address=False,
show_postcode=None,
show_latlon=None,
latlon_mode="decimal",
latlon_mode_toggle=True,
show_map=None,
open_map_on_load=False,
feature_required=False,
lines=False,
points=True,
polygons=False,
circles=False,
color_picker=False,
catalog_layers=False,
min_bbox=None,
labels=True,
placeholders=False,
error_message=None,
represent=None,
prevent_duplicate_addresses=False)
(Constructor)
| source code
|
Constructor
- Parameters:
levels - list or tuple of hierarchy levels (names) to expose, in order
(e.g. ("L0", "L1", "L2")) or False
to disable completely
required_levels - list or tuple of required hierarchy levels (if empty, only the
highest selectable Lx will be required)
hide_lx - hide Lx selectors until higher level has been selected
reverse_lx - render Lx selectors in the order usually used by street Addresses
(lowest level first), and below the address line
show_address - show a field for street address. If the parameter is set to a
string then this is used as the label.
show_postcode - show a field for postcode
show_latlon - show fields for manual Lat/Lon input
latlon_mode - (initial) lat/lon input mode ("decimal" or
"dms")
latlon_mode_toggle - allow user to toggle lat/lon input mode
show_map - show a map to select specific points
open_map_on_load - show map on load
feature_required - map feature is required
lines - use a line draw tool
points - use a point draw tool
polygons - use a polygon draw tool
circles - use a circle draw tool
color_picker - display a color-picker to set per-feature styling (also need to
enable in the feature layer to show on map)
catalog_layers - display catalogue layers or just the default base layer
min_bbox - minimum BBOX in map selector, used to determine automatic zoom
level for single-point locations
labels - show labels on inputs
placeholders - show placeholder text in inputs
error_message - default error message for server-side validation
represent - an S3Represent instance that can represent non-DB rows
prevent_duplicate_addresses - do a check for duplicate addresses & prevent creation of
record if a dupe is found
|