Fix maps not rendering: Neshan SDK URL was a 404
The map script loaded https://static.neshan.org/sdk/leaflet/1.4.0/neshan-sdk/v1.0.8/index.js, which Neshan has removed (returns 404) — so window.L never defined, the init bailed, and NO map rendered anywhere (detail pages + the facility-register picker). Switch to Neshan''s current SDK (.../1.4.0/leaflet.js + leaflet.css, both 200). The init API is unchanged (new L.Map with the maptype option), so no other code changes needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -88,8 +88,8 @@
|
|||||||
@section Scripts {
|
@section Scripts {
|
||||||
@if (!string.IsNullOrEmpty(Model.MapKey))
|
@if (!string.IsNullOrEmpty(Model.MapKey))
|
||||||
{
|
{
|
||||||
<link rel="stylesheet" href="https://static.neshan.org/sdk/leaflet/1.4.0/neshan-sdk/v1.0.8/index.css" />
|
<link rel="stylesheet" href="https://static.neshan.org/sdk/leaflet/1.4.0/leaflet.css" />
|
||||||
<script src="https://static.neshan.org/sdk/leaflet/1.4.0/neshan-sdk/v1.0.8/index.js"></script>
|
<script src="https://static.neshan.org/sdk/leaflet/1.4.0/leaflet.js"></script>
|
||||||
}
|
}
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
data-lat="…" data-lng="…"> exists. Pass the Neshan web key as the model.
|
data-lat="…" data-lng="…"> exists. Pass the Neshan web key as the model.
|
||||||
The SDK is a synchronous script, so the init below runs once L is defined.
|
The SDK is a synchronous script, so the init below runs once L is defined.
|
||||||
*@
|
*@
|
||||||
<link rel="stylesheet" href="https://static.neshan.org/sdk/leaflet/1.4.0/neshan-sdk/v1.0.8/index.css" />
|
<link rel="stylesheet" href="https://static.neshan.org/sdk/leaflet/1.4.0/leaflet.css" />
|
||||||
<script src="https://static.neshan.org/sdk/leaflet/1.4.0/neshan-sdk/v1.0.8/index.js"></script>
|
<script src="https://static.neshan.org/sdk/leaflet/1.4.0/leaflet.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
var el = document.getElementById('facmap');
|
var el = document.getElementById('facmap');
|
||||||
|
|||||||
Reference in New Issue
Block a user