ThinkGeo.com    |     Documentation    |     Premium Support

Loading Markers without loop

Hi


     I want to know that is it possible to load markers (more than 20000)  to a layer without using loop(for,foreach).  The looping consumes more time to load, so can you please provide any work around to load markers without using looping statement .


 


Thanks in Advance


Regards


Karunakaran M



Hi Karunakaran, 
  
 Your question is the same one with this topic: gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/9592/afv/topic/Default.aspx 
  
 I will reply you there. 
  
 Regards, 
  
 Don

Hi Karunakaran,

You can use FeatureSourceMarkerOverlay to display many markers. There’s a data source behind the scenes to provide the data, and you don’t have to loop through each feature to make it show.

Here is the detail about this class.
http://wiki.thinkgeo.com/wiki/api/thinkgeo.mapsuite.wpf.featuresourcemarkeroverlay

Here is the WPF HowDoI sample where you can find this function:

Here you can find the sample code of this particular feature (FeatureSourceMarkerOverlay):

But display too many markers (like 20,000 mentioned in the thread) on the map will slow things done a bit anyway. You can have a try and find the balance between the count of the features you want to show and its performance.

Thanks,
Mark