Skip to content

Commit

Permalink
read url from html code
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 4, 2024
1 parent 98207fe commit c405760
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shps/templates/shps/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
</div>

</div>
<span id="url" class="visually-hidden" aria-hidden="true">{% url 'shapes:shapes_geojson' %}{% querystring %}</span>

<script type="text/javascript">

function map_init_basic(map, options) {
const url = "{% url 'shapes:shapes_geojson' %}{% querystring %}";
const url = document.getElementById("url").textContent;
const mapContainer = document.getElementById("mapContainer");
const spinner = document.getElementById("spinner");

Expand Down

0 comments on commit c405760

Please sign in to comment.