Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -1
index.html
CHANGED
|
@@ -276,7 +276,7 @@ function openEditor(e) {
|
|
| 276 |
}));
|
| 277 |
const t = map.getCenter();
|
| 278 |
const n = map.getZoom();
|
| 279 |
-
|
| 280 |
<div id="map" style="height: 600px; width: 100%;"></div>
|
| 281 |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" />
|
| 282 |
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"><\/script>
|
|
@@ -305,6 +305,7 @@ function openEditor(e) {
|
|
| 305 |
`).join("\n")}
|
| 306 |
<\/script>
|
| 307 |
`;
|
|
|
|
| 308 |
document.getElementById("output-html").value = o;
|
| 309 |
const input = document.getElementById('output-html').value;
|
| 310 |
const output = document.getElementById('output-code');
|
|
|
|
| 276 |
}));
|
| 277 |
const t = map.getCenter();
|
| 278 |
const n = map.getZoom();
|
| 279 |
+
let o = `
|
| 280 |
<div id="map" style="height: 600px; width: 100%;"></div>
|
| 281 |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" />
|
| 282 |
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"><\/script>
|
|
|
|
| 305 |
`).join("\n")}
|
| 306 |
<\/script>
|
| 307 |
`;
|
| 308 |
+
o = o.replace(/iconUrl: 'marker-icon\.png'/, `iconUrl: '${location.origin}/marker-icon.png'`);
|
| 309 |
document.getElementById("output-html").value = o;
|
| 310 |
const input = document.getElementById('output-html').value;
|
| 311 |
const output = document.getElementById('output-code');
|