Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Map Performance for Adding Symbol Elements
posted

Hi,

Our application require to create the symbol elements in a map layer programatically.

I am using a loop to add 440 symbol elements to a Map layer using MyLayer.Elements.Add(Symbol). It took about 40 seconds to finish. It is too slow. Is there any way we can improve the performance?

Thanks   

Parents
No Data
Reply
  • 28496
    Verified Answer
    Offline posted

    the map subscribes to the Elements' CollectionChanged event, so each time you add an element, code is executed to refresh the UI.

    try creating your layer in code, adding elements to it, then adding it to the map's Layers collection and optionally calling WindowFit().  this should require only one refresh of the UI.

Children