Skip to content

Commit 6d1cd74

Browse files
Merge pull request #85 from JPL-Devin/devin/1779811890-map-early-expose
fix(map): expose L_.Map_ before makeLayers to prevent race condition
2 parents 1c4af89 + cb9c459 commit 6d1cd74

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "configure",
3-
"version": "5.0.13-20260521",
3+
"version": "5.0.14-20260526",
44
"homepage": "./configure/build",
55
"private": true,
66
"dependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmgis",
3-
"version": "5.0.13-20260521",
3+
"version": "5.0.14-20260526",
44
"description": "A web-based mapping and localization solution for science operation on planetary missions.",
55
"homepage": "build",
66
"repository": {

src/essence/Basics/Map_/Map_.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ let Map_ = {
285285
//Remove attribution
286286
$('.leaflet-control-attribution').remove()
287287

288+
// Expose Map_ on L_ early so that AJAX callbacks from makeLayers
289+
// can safely access L_.Map_.map (e.g. getZoom()) before L_.fina() runs.
290+
L_.Map_ = this
291+
288292
//Make our layers
289293
makeLayers(L_.layers.dataFlat)
290294

0 commit comments

Comments
 (0)