LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 3, 2026, 5:45 AM
updatedAtNov 3, 2026, 4:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/20211
authorneo-opus-vega
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 3, 2026, 4:31 PM

OpenStreetMaps wrapper: pass mapId to destroyMarkers and send Record fields to addMarker

Closed v13.4.0/archive-v13-4-0-chunk-3 buggood first issueaicore
neo-opus-vega
neo-opus-vega commented on Nov 3, 2026, 5:45 AM

Corrected 2026-11-03 ~06:55Z, after Emmy's review on #20221 (pullrequestreview-5748178262). The first version called the OpenStreetMaps addon the Google Maps twin. It is not. Its addMarker is a TODO (src/main/addon/OpenStreetMaps.mjs:76 at dev 5798ef61), and the vector source and layer setup is commented out (around l.138-146), so the addon draws no markers it could remove. That marker lifecycle is the scope of #6610, which builds the addon toward Google Maps parity. This ticket keeps the wrapper's side of the contract, which IS the twin of #20209's wrapper fix.

Context

Found while reviewing #20209, which fixes the same wrapper defects for Google Maps (#4529). The OpenStreetMaps wrapper shares them. Its addon is still partial (#6610).

The Problem

  1. The destroy call names the map by the wrong key. Neo.component.wrapper.OpenStreetMaps#onMarkerStoreLoad (src/component/wrapper/OpenStreetMaps.mjs, around l.281) passes {appName, id, windowId}, while the addon's destroyMarkers documents data.mapId.
  2. Record markers arrive empty. The same method spreads each store item into addMarker (...item). With the default autoInitRecords: true, items are Neo.data.Record instances whose fields are prototype getters, so the spread copies none of them. Record#toJSON() returns the data (src/data/RecordFactory.mjs, around l.336).

The Architectural Reality

  • The Google Maps wrapper fix to mirror is #20209: the wrapper passes mapId: id and spreads item.toJSON?.() || item.
  • The addon side is #6610. addMarker, destroyMarkers and removeMarker are TODOs there. Once #6610 implements them against the data.mapId and record fields this wrapper sends, removed markers leave the map.
  • Design authority: n/a. The wrong key and the empty spread contradict what the addon's documented API reads.

The Fix

In the wrapper's onMarkerStoreLoad, pass mapId: id to destroyMarkers, and spread item.toJSON?.() || item into addMarker.

Acceptance Criteria

  • AC-1: On a reload of markerStore, the wrapper calls destroyMarkers with mapId: id. A unit spec on a mocked addon that records the remote calls asserts their payloads. It asserts no map state, because the addon keeps none yet (#6610).
  • AC-2: A store of Neo.data.Record instances passes each record's fields (id, position and the rest) to addMarker, covered by the same spec.

Out of Scope

  • The addon's marker lifecycle: drawing, removing and registering markers on the OpenLayers map. That is #6610.
  • In-place record changes. The Google Maps analog is #4955.

Related

  • #4529 / #20209: the Google Maps twin and its fix.
  • #6610: the OpenStreetMaps addon toward Google Maps parity, including markers.
  • #4955: Google Maps recordChange handling.

Sweep attestations (first version):

  • Live latest-open + closed sweep: the latest 20 open, plus a closed search ("OpenStreetMaps") at 2026-11-03T04:2xZ. The only closed hit, #461, covers center() animation, a different surface. No equivalent.
  • A2A in-flight sweep: recent claims cover #3335 and #5005 (Maryam). No claim on OpenStreetMaps markers.
  • Memory Core sweep: query_raw_memories on the problem nouns. No prior decision.
  • Own-assignment sweep: no overlap.

Origin Session ID: afcce2e4-5eb9-4fa6-8895-4730263a042d

Retrieval Hint: "OpenStreetMaps wrapper destroyMarkers mapId Record toJSON spread markerStore"

tobiu referenced in commit 6cff0da - "fix(component): pass mapId to destroyMarkers and spread Record#toJSON() in OpenStreetMaps wrapper (#20211) (#20221) on Nov 3, 2026, 4:31 PM
tobiu closed this issue on Nov 3, 2026, 4:31 PM