gis.utils.mapping()

mapping(data_source, geom_name='geom', layer_key=0, multi_geom=False)

gis.widgets.BaseGeometryWidget

class BaseGeometryWidget This is an abstract base widget containing the logic needed by subclasses. You cannot directly use this widget for a geometry field. Note that the rendering of GeoDjango widgets is based on a template, identified by the template_name class attribute. OpenLayersWidget

gis.widgets.BaseGeometryWidget.display_raw

BaseGeometryWidget.display_raw Boolean value specifying if a textarea input showing the serialized representation of the current geometry is visible, mainly for debugging purposes (default is False).

gis.widgets.BaseGeometryWidget.geom_type

BaseGeometryWidget.geom_type The OpenGIS geometry type, generally set by the form field.

gis.widgets.BaseGeometryWidget.map_height

BaseGeometryWidget.map_height

gis.widgets.BaseGeometryWidget.map_srid

BaseGeometryWidget.map_srid SRID code used by the map (default is 4326).

gis.widgets.BaseGeometryWidget.map_width

BaseGeometryWidget.map_width Height and width of the widget map (default is 400x600).

gis.widgets.BaseGeometryWidget.supports_3d

BaseGeometryWidget.supports_3d Indicates if the widget supports edition of 3D data (default is False).

gis.widgets.BaseGeometryWidget.template_name

BaseGeometryWidget.template_name The template used to render the map widget. You can pass widget attributes in the same manner that for any other Django widget. For example: from django.contrib.gis import forms class MyGeoForm(forms.Form): point = forms.PointField(widget= forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500}))

gis.widgets.OpenLayersWidget

class OpenLayersWidget This is the default widget used by all GeoDjango form fields. template_name is gis/openlayers.html. OpenLayersWidget and OSMWidget use the openlayers.js file hosted on the openlayers.org website. This works for basic usage during development, but isn’t appropriate for a production deployment as openlayers.org/api/ has no guaranteed uptime and runs on a slow server. You are therefore advised to subclass these widgets in order to specify your own version of the openlayer