mirror of
https://github.com/django/django.git
synced 2024-11-18 07:26:04 +00:00
459c71e332
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
58 lines
1.3 KiB
Plaintext
58 lines
1.3 KiB
Plaintext
.. _ref-gis-admin:
|
|
|
|
======================
|
|
GeoDjango's admin site
|
|
======================
|
|
|
|
.. module:: django.contrib.gis.admin
|
|
:synopsis: GeoDjango's extensions to the admin site.
|
|
|
|
|
|
``GeoModelAdmin``
|
|
=================
|
|
|
|
.. class:: GeoModelAdmin
|
|
|
|
.. attribute:: default_lon
|
|
|
|
The default center longitude.
|
|
|
|
.. attribute:: default_lat
|
|
|
|
The default center latitude.
|
|
|
|
.. attribute:: default_zoom
|
|
|
|
The default zoom level to use. Defaults to 18.
|
|
|
|
.. attribute:: extra_js
|
|
|
|
Sequence of URLs to any extra JavaScript to include.
|
|
|
|
.. attribute:: map_template
|
|
|
|
Override the template used to generate the JavaScript slippy map.
|
|
Default is ``'gis/admin/openlayers.html'``.
|
|
|
|
.. attribute:: map_width
|
|
|
|
Width of the map, in pixels. Defaults to 600.
|
|
|
|
.. attribute:: map_height
|
|
|
|
Height of the map, in pixels. Defaults to 400.
|
|
|
|
.. attribute:: openlayers_url
|
|
|
|
Link to the URL of the OpenLayers JavaScript. Defaults to
|
|
``'http://openlayers.org/api/2.8/OpenLayers.js'``.
|
|
|
|
``OSMGeoAdmin``
|
|
===============
|
|
|
|
.. class:: OSMGeoAdmin
|
|
|
|
A subclass of :class:`GeoModelAdmin` that uses a spherical mercator projection
|
|
with OpenStreetMap street data tiles. See the :ref:`OSMGeoAdmin introduction <osmgeoadmin-intro>`
|
|
in the tutorial for a usage example.
|