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 openlayers.js file in the js property of the inner Media class (see Assets as a static definition). You can host a copy of openlayers.js tailored to your needs on your own server or refer to a copy from a content-delivery network like https://cdnjs.com/. This will also allow you to serve the JavaScript file(s) using the https protocol if needed.

OSMWidget

doc_Django
2016-10-09 18:38:37
Comments
Leave a Comment

Please login to continue.