Geoportail-Luxembourg / geoportailv3

geoportailv3 is the implementation of the v3 of the map viewer of the luxembourgish geoportal
MIT License
26 stars 16 forks source link

MyMap onFeatureSelected_ not working when description for feature exist #3054

Closed PitWenkin closed 1 year ago

PitWenkin commented 1 year ago

As far as I understand the if https://github.com/Geoportail-Luxembourg/geoportailv3/blob/ddf2a349f6f46840379847adb0fa675bda420545/geoportal/jsapi/src/mymap.js#L304

is rewritten to d.description && document.createElement("P").appendChild(d.description);

which causes an javascript error

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. at nA.Za (apiv3.js:881:260) at fv.c (apiv3.js:49:350) at cd.b (apiv3.js:52:211) at fv.gv (apiv3.js:627:214) at a.c.handleEvent (apiv3.js:879:161) at l.Ti (apiv3.js:131:417) at he.c (apiv3.js:49:350) at cd.b (apiv3.js:52:211) at he. (apiv3.js:73:887)

The original code should however work …

(Same problem exists in apiv4)

rmichaelis commented 1 year ago

The issue has now been solved.