-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #25706 -- Removed inline JS from openlayers templates.
- Loading branch information
Showing
7 changed files
with
128 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 1,10 @@ | ||
{% load i18n l10n %} | ||
{% load i18n %} | ||
|
||
<div id="{{ id }}_div_map" class="dj_map_wrapper"> | ||
<div id="{{ id }}_map" class="dj_map"></div> | ||
<div id="{{ widget.attrs.id }}_div_map" class="dj_map_wrapper"> | ||
<div id="{{ widget.attrs.id }}_map" class="dj_map"></div> | ||
{% if not disabled %}<span class="clear_features"><a href="">{% translate "Delete all Features" %}</a></span>{% endif %} | ||
{% if display_raw %}<p>{% translate "Debugging window (serialized value)" %}</p>{% endif %} | ||
<textarea id="{{ id }}" class="vSerializedField required" cols="150" rows="10" name="{{ name }}" | ||
{% if not display_raw %} hidden{% endif %}>{{ serialized }}</textarea> | ||
<script> | ||
{% block base_layer %} | ||
var base_layer = new ol.layer.Tile({ | ||
source: new ol.source.XYZ({ | ||
attributions: "NASA Worldview", | ||
maxZoom: 8, | ||
url: "https://map1{a-c}.vis.earthdata.nasa.gov/wmts-webmerc/" | ||
"BlueMarble_ShadedRelief_Bathymetry/default/{Time}/" | ||
"GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpg" | ||
}) | ||
}); | ||
{% endblock %} | ||
{% block options %}var options = { | ||
base_layer: base_layer, | ||
geom_name: '{{ geom_type }}', | ||
id: '{{ id }}', | ||
map_id: '{{ id }}_map', | ||
map_srid: {{ map_srid|unlocalize }}, | ||
name: '{{ name }}' | ||
}; | ||
{% endblock %} | ||
var {{ module }} = new MapWidget(options); | ||
</script> | ||
{% if widget.attrs.display_raw %}<p>{% translate "Debugging window (serialized value)" %}</p>{% endif %} | ||
<textarea id="{{ widget.attrs.id }}" class="vSerializedField required" cols="150" rows="10" name="{{ widget.name }}" | ||
{% if not widget.attrs.display_raw %} hidden{% endif %}>{{ serialized }}</textarea> | ||
{{ widget_options|json_script:"mapwidget-options" }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters