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
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.
hi
i want to add some symbols say (boiler.png) to particular elements. i gone throw some online resource where they added new layer for symbol which i don't want. is't possible to add symbol to map element with out adding extra layer .i have code for adding symbol to map element with the use of another layer...
you could try using the ValueTemplate property, but that is designed to show graphics over every map element in a layer, not just a single one.
alternatively, you could just overlay the symbols on top of the map, but that requires translating the MapElement coordinates to window coordinates, which is a bit tricky.
can you please tell how to translate MapElement coordinates to window coordinates, which is a bit tricky?. at the time of mapimport. I am trying to have my icons and symbols overlay on my map at the time of it import. But got struck with converting world rect to windows coordinates. Thank you in advance.
Hi vamsi2654,
Please take a look at this how to Add an Image Using Map Elements: http://help.infragistics.com/Help/Doc/DV/2010.3/CLR4.0/html/xamWebMap_Add_Image_Using_Map_Elements.html
Regards,
Ivan Kotev
Hi, I am aware of adding symbols to map by creating one more layer. What I need to do is I don't want to create new layers, i just want to overlay my labels n images on top of my map by getting map elements positions. For that thing I need to convert map coordinates to windows coordinates. Thanks for your help.
Please take a look at this forum post: https://ko.infragistics.com/community/forums/f/retired-products-and-controls/36476/get-mouse-poisition-when-hovering-map-element/211885#211885