AnatomicMaps / flatmap-viewer

Apache License 2.0
0 stars 7 forks source link

No feature for X on map; can't find substitute - Error flooding the console with messages #31

Open Tehsurfer opened 5 months ago

Tehsurfer commented 5 months ago

When using flatmapImp.addDatasetMarkers(markers);

the console gets flooded with info and error messages which look like:

No feature for UBERON:0002262 on map; can't find substitute

40 messages and 97 errors show in the console each time the 320 datasets are added to the flatmap.

This can be an issue when looking for other errors and messages, and once it gets to 5k+ errors the chrome dev console crahses

To reproduce:

  1. clone this branch: https://github.com/Tehsurfer/mapintegratedvuer/tree/marker-clustering

  2. Put the .env.local file I sent into the root directory of the repo if you don't already have those variables

  3. npm run serve should produce the error

dbrnz commented 5 months ago

What about not asking the map to add markers for features it doesn't have? map.anatomicalIdentifiers will get the list of terms known to the map.

The Chrome console crashing with lots of errors is an issue with Chrome...

Tehsurfer commented 5 months ago

Sure, I'll have a look and see if I can use that to only add markers which we know will be there

Tehsurfer commented 5 months ago

Ok I got it:

flatmapImp.uuid
>'b4561810-70d0-5f64-9eac-88ea73446ca6'