locked
What is the best approach to render a huge number of filled polygons on Bing Maps using WPF? RRS feed

  • Question

  • Hi,

    I am working on a project that needs to display colored squares on the Map, which is being plotted when a central location is received from another project that is running. I am using MapPolyline/MapPolygon and dedicated Maplayer to achieve this. As my software receives the locations, a new polygon(square) is created which will be adjacent to the existing ones, and the CPU usage is increasing as I add more polygons. After a while, I stop adding more polygons, but even at this time, the CPU usage remains high. The CPU usage reduces only after I clear the Maplayer with all the polygons that were rendered. 

    What would be the best approach to render these polygons on the Map? Any suggestions would be appreciated. 

    Wednesday, April 22, 2020 7:27 AM

All replies

  • Hi Reesha,

    The WPF control was not designed for very large polygon datasets.  Each polygon becomes it's own XAML object and that is why you see the heavy process hit.  This control is no longer in Development so our recommendation would be to move to the UWP control.  This is the same control that powers the Windows Map Application and is still under development and support.

    The documentation for this control is available at https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/

    Sincerely,

    IoTGirl

    Wednesday, April 22, 2020 5:53 PM
  • Hi IoTGirl,

    Thank you for your response. I will look into UWP control. 

    Thursday, April 30, 2020 10:03 AM