IOT-Map-Component icon indicating copy to clipboard operation
IOT-Map-Component copied to clipboard

Accuracy circle is not displayed in some cases

Open julien-deramond opened this issue 4 years ago • 2 comments

Needs more information from Live Objects

julien-deramond avatar Dec 30 '21 14:12 julien-deramond

Hello,

Yes, here are some information.

Based on Storybook,

In the story https://orange-opensource.github.io/IOT-Map-Component/?path=/story/iot-map-manager--clusters

If you replace data in Knobs with those data :

[ { "id": "s5", "location": { "lat": 44.895, "lng": 4.89 }, "shape": { "type": 1, "anchored": true, "plain": false, "accuracy": 200, "color": "#CCCCCC" }, "inner": { "icon": "iotmap-icons-bluetooth", "color": "black" }, "layer": "Etablissements", "status": "inactive" } ]

The particularity of that data is that there is only one layer (there could be more than one marker in it)

Then you can observe that :

  1. The Accuracy is no more displayed => BUG
  2. The layers selector has one layer : Etablissements => OK
  3. If you check off the Etablissements layer, nothing is now displayed => OK
  4. Switch back the Etablissements layer, then the Accuracy is displayed and you can notice that now there are two layers in the layers selector (Etablissements and Accuracy, that is the default accuracy layer configured for the story)

Suomi and Jacques :)

jacques-lebourgeois avatar Jun 01 '22 16:06 jacques-lebourgeois

NB : in LiveObjects, we have a temporary workaround by calling

this.iotMapMarkerManager.markersObjects[markerId].updateAccuracyDisplay(
        ['default'],
        true
      );

on each marker after any new map display

jacques-lebourgeois avatar Jun 02 '22 06:06 jacques-lebourgeois