GeoModelAdmin
PGeoModelAdmin
Pdefault_lon
PThe default center longitude.
default_lat
PThe default center latitude.
default_zoom
PThe default zoom level to use. Defaults to 4.
extra_js
PSequence of URLs to any extra JavaScript to include.
map_template
POverride the template used to generate the JavaScript slippy map.
Default is 'gis/admin/openlayers.html'
.
map_width
PWidth of the map, in pixels. Defaults to 600.
map_height
PHeight of the map, in pixels. Defaults to 400.
openlayers_url
PLink to the URL of the OpenLayers JavaScript. Defaults to
'https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js'
.
modifiable
PDefaults to True
. When set to False
, disables editing of
existing geometry fields in the admin.
注解
This is different from adding the geometry field to
readonly_fields
,
which will only display the WKT of the geometry. Setting
modifiable=False
, actually displays the geometry in a map,
but disables the ability to edit its vertices.
OSMGeoAdmin
POSMGeoAdmin
PA subclass of GeoModelAdmin
that uses a Spherical Mercator projection
with OpenStreetMap street data tiles.
See the OSMGeoAdmin introduction
in the tutorial for a usage example.
8月 23, 2019