diff -r cd821dfec22a django/contrib/gis/templates/gis/admin/openlayers.js
a
|
b
|
|
115 | 115 | {{ module }}.map.addLayer({{ module }}.layers.base); |
116 | 116 | {% block extra_layers %}{% endblock %} |
117 | 117 | {% if is_linestring %}OpenLayers.Feature.Vector.style["default"]["strokeWidth"] = 3; // Default too thin for linestrings. {% endif %} |
118 | | {{ module }}.layers.vector = new OpenLayers.Layer.Vector(" {{ field_name }}"); |
| 118 | {{ module }}.layers.vector = new OpenLayers.Layer.Vector(" {{ field_name }}", { |
| 119 | styleMap: new OpenLayers.StyleMap({ |
| 120 | temporary: OpenLayers.Util.applyDefaults({ |
| 121 | pointRadius: 16 |
| 122 | }, OpenLayers.Feature.Vector.style.temporary) |
| 123 | })}); |
119 | 124 | {{ module }}.map.addLayer({{ module }}.layers.vector); |
120 | 125 | // Read WKT from the text field. |
121 | 126 | var wkt = document.getElementById('{{ id }}').value; |
… |
… |
|
159 | 164 | {% if mouse_position %}{{ module }}.map.addControl(new OpenLayers.Control.MousePosition());{% endif %} |
160 | 165 | {% if scale_text %}{{ module }}.map.addControl(new OpenLayers.Control.Scale());{% endif %} |
161 | 166 | {% if layerswitcher %}{{ module }}.map.addControl(new OpenLayers.Control.LayerSwitcher());{% endif %} |
| 167 | {{ module }}.map.addControl(new OpenLayers.Control.TouchNavigation({ |
| 168 | dragPanOptions: { |
| 169 | enableKinetic: true |
| 170 | } |
| 171 | })) |
162 | 172 | // Then add optional behavior controls |
163 | 173 | {% if not scrollable %}{{ module }}.map.getControlsByClass('OpenLayers.Control.Navigation')[0].disableZoomWheel();{% endif %} |
164 | 174 | {% endblock %} |