Ticket #21618: 21618-2.diff

File 21618-2.diff, 1.7 KB (added by Tim Graham, 11 years ago)

minor edits

  • docs/ref/contrib/gis/forms-api.txt

    diff --git a/docs/ref/contrib/gis/forms-api.txt b/docs/ref/contrib/gis/forms-api.txt
    index 435bcfc..a556fac 100644
    a b Widget classes  
    156156    This is the default widget used by all GeoDjango form fields.
    157157    ``template_name`` is ``gis/openlayers.html``.
    158158
     159    ``OpenLayersWidget`` and :class:`OSMWidget` use the ``openlayers.js`` file
     160    hosted on the ``openlayers.org`` Web site. This works for basic usage
     161    during development, but isn't appropropriate for a production deployment as
     162    ``openlayers.org/api/`` has no guaranteed uptime and runs on a slow server.
     163    You are therefore advised to subclass these widgets in order to specify
     164    your own version of the ``openlayers.js`` file in the ``js`` property of
     165    the inner ``Media`` class (see :ref:`assets-as-a-static-definition`). You
     166    can host a copy of ``openlayers.js``
     167    `tailored to your needs`_ on your own server or refer to a copy from a
     168    content-delivery network like http://cdnjs.com/. This will also allow
     169    you to serve the JavaScript file(s) using the ``https`` protocol if needed.
     170
     171    .. _tailored to your needs: http://docs.openlayers.org/library/deploying.html
     172
    159173``OSMWidget``
    160174
    161175.. class:: OSMWidget
    Widget classes  
    163177    This widget uses an OpenStreetMap base layer (Mapnik) to display geographic
    164178    objects on.
    165179    ``template_name`` is ``gis/openlayers-osm.html``.
     180
     181    The :class:`OpenLayersWidget` note about JavaScript file hosting above also
     182    applies here. See also this `FAQ answer`_ about ``https`` access to map
     183    tiles.
     184
     185    .. _FAQ answer: https://help.openstreetmap.org/questions/10920/how-to-embed-a-map-in-my-https-site
Back to Top