Adding Markers to the bubble layer makes the whole map flicker/redraw every time

1 Answer 13 Views
Map
Noah
Top achievements
Rank 2
Iron
Iron
Iron
Noah asked on 30 May 2024, 04:50 PM

We have a map tile layer and are trying to show the growth of our locations by programmatically adding makers to the array used by the bubble layer on a timed interval.  And it "works" but every time we update the array of markers, the entire map redraws or flashes or something.  Is that avoidable?  In the code below displayMarkers() is a computed signal that returns an array of markers depending on where we are in the chronological progression.

    <kendo-map-layers>
      <kendo-map-tile-layer #tileLayer [subdomains]="tileSubdomains" [urlTemplate]="tileUrl"
        attribution="&copy; <a href='https://osm.org/copyright'>OpenStreetMap contributors</a>">
      </kendo-map-tile-layer>
      <kendo-map-bubble-layer #markerLayer [data]="displayMarkers()" locationField="latlng" valueField="size"
        [symbol]="vanguardSymbol"></kendo-map-bubble-layer>
    </kendo-map-layers>
Noah
Top achievements
Rank 2
Iron
Iron
Iron
commented on 31 May 2024, 02:57 PM

Ok, it wasn't happening in production.  I little experimentation and it turns out having the developer window open while it's running causes the whole map to redraw. With that closed, the tile layer redraw doesn't seem to happen.

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 04 Jun 2024, 07:34 AM

Hello Noah,

I tried to reproduce the issue, but adding another bubble to the Map doesn't rerender the Map:

https://stackblitz.com/edit/angular-sti1jt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Furban-areas.json,src%2Findex.html

Please could you check this example and let me know what I am missing. Also feel free to edit the demo in a way that replicates the Map usage on your side. Thank you in advance.

I am looking forward to your reply.

Regards,
Martin Bechev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Map
Asked by
Noah
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Martin Bechev
Telerik team
Share this question
or