# Very Large Number of Markers (Clickable)

**URL:** <https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497>\
**Category:** WPF\
**Created:** [August 31, 2013, 2:38pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497 "2013-08-31T14:38:52Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [August 31, 2013, 2:38pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/1 "2013-08-31T14:38:52Z")

</div>

Hi,  
  
  
  
Firstly&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;appreciate&nbsp;the&nbsp;tech&nbsp;team&nbsp;for&nbsp;the&nbsp;comprehensive&nbsp;Samples.It&nbsp;was&nbsp;pretty&nbsp;easy&nbsp;&nbsp;to&nbsp;use&nbsp;the&nbsp;Maps&nbsp;using&nbsp;the&nbsp;samples.However,&nbsp;for&nbsp;one&nbsp;of&nbsp;my&nbsp;needs&nbsp;I&nbsp;am&nbsp;totally&nbsp;lost&nbsp;and&nbsp;not&nbsp;able&nbsp;to&nbsp;find&nbsp;a&nbsp;solution.I&nbsp;am&nbsp;trying&nbsp;to&nbsp;load&nbsp;a&nbsp;huge&nbsp;number&nbsp;of&nbsp;markers&nbsp;on&nbsp;my&nbsp;map&nbsp;(about&nbsp;one&nbsp;million,&nbsp;at&nbsp;this&nbsp;point&nbsp;…&nbsp;which&nbsp;will&nbsp;grow&nbsp;incrementally&nbsp;over&nbsp;the&nbsp;course&nbsp;of&nbsp;time).  
  
  
  
I&nbsp;tried&nbsp;using&nbsp;FeatureSourceMarkerOverlay&nbsp;,&nbsp;ShapeFileFeatureLayer&nbsp;+&nbsp;&nbsp;InMemoryMarkerOverlay&nbsp;and&nbsp;other&nbsp;methods&nbsp;but&nbsp;could&nbsp;not&nbsp;achieve&nbsp;what&nbsp;I&nbsp;wanted.the&nbsp;app&nbsp;either&nbsp;errors&nbsp;out&nbsp;or&nbsp;does&nbsp;not&nbsp;display&nbsp;anything.I&nbsp;have&nbsp;searched&nbsp;the&nbsp;forum&nbsp;but&nbsp;still&nbsp;couldn’t&nbsp;get&nbsp;the&nbsp;solution;may&nbsp;be&nbsp;I&nbsp;could&nbsp;not&nbsp;understand&nbsp;a&nbsp;few.  
  
  
  
I&nbsp;would&nbsp;appreciate&nbsp;if&nbsp;someone&nbsp;could&nbsp;provide&nbsp;a&nbsp;sample&nbsp;on&nbsp;how&nbsp;these&nbsp;large&nbsp;number&nbsp;of&nbsp;markers&nbsp;can&nbsp;be&nbsp;overlay&nbsp;seamlessly&nbsp;with&nbsp;a&nbsp;decent&nbsp;performance&nbsp;and&nbsp;speed.These&nbsp;location&nbsp;of&nbsp;markers&nbsp;is&nbsp;based&nbsp;on&nbsp;list&nbsp;of&nbsp;coordinates&nbsp;from&nbsp;a&nbsp;&nbsp;custom&nbsp;database&nbsp;.  
  
  
  
Thanks…Kreez&nbsp;!!!

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 2, 2013, 3:56am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/2 "2013-09-02T03:56:47Z")

</div>

Hi&nbsp;Kreez,&nbsp;

Welcome&nbsp;to&nbsp;Map&nbsp;Suite&nbsp;Forums!&nbsp;Following&nbsp;is&nbsp;our&nbsp;suggestions&nbsp;and&nbsp;some&nbsp;questions&nbsp;we&nbsp;are&nbsp;not&nbsp;clear,&nbsp;please&nbsp;check&nbsp;it&nbsp;out:

1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As&nbsp;one&nbsp;million&nbsp;markers&nbsp;at&nbsp;one&nbsp;view&nbsp;would&nbsp;generate&nbsp;a&nbsp;huge&nbsp;element&nbsp;tree&nbsp;in&nbsp;Wpf&nbsp;and&nbsp;this&nbsp;absolutely&nbsp;will&nbsp;bring&nbsp;a&nbsp;bad&nbsp;&nbsp;performance&nbsp;or&nbsp;potential&nbsp;issues.&nbsp;I&nbsp;guess&nbsp;maybe&nbsp;you&nbsp;can&nbsp;try&nbsp;clustering&nbsp;strategy,&nbsp;just&nbsp;like&nbsp;what&nbsp;we&nbsp;have&nbsp;supported&nbsp;in&nbsp;ClusterPointStyle:&nbsp;&nbsp;it&nbsp;is&nbsp;a&nbsp;custom&nbsp;style&nbsp;&nbsp;which&nbsp;we&nbsp;can&nbsp;use&nbsp;it&nbsp;to&nbsp;just&nbsp;show&nbsp;the&nbsp;‘parent‘&nbsp;markers&nbsp;at&nbsp;a&nbsp;high&nbsp;zoomlevel,&nbsp;and&nbsp;when&nbsp;we&nbsp;zoom&nbsp;into&nbsp;those&nbsp;“parent”&nbsp;markers,&nbsp;then&nbsp;we&nbsp;can&nbsp;see&nbsp;more&nbsp;sub-markers&nbsp;which&nbsp;includes&nbsp;in&nbsp;those&nbsp;parent&nbsp;markers.&nbsp;Here&nbsp;is&nbsp;a&nbsp;sample&nbsp;for&nbsp;clusterpointstyle:&nbsp;[wiki.thinkgeo.com/wiki/Map\_S…PointStyle](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Styles_Samples#ClusterPointStyle)

2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Would&nbsp;you&nbsp;please&nbsp;let&nbsp;us&nbsp;know&nbsp;more&nbsp;details&nbsp;about&nbsp;your&nbsp;scenarios&nbsp;on&nbsp;the&nbsp;one&nbsp;million&nbsp;markers?&nbsp;Will&nbsp;the&nbsp;markers&nbsp;refresh&nbsp;dynamically&nbsp;as&nbsp;the&nbsp;time&nbsp;goes&nbsp;on?

&nbsp;

Waiting&nbsp;for&nbsp;your&nbsp;further&nbsp;information,

Best&nbsp;regards,

Summer

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 2, 2013, 1:06pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/3 "2013-09-02T13:06:55Z")

</div>

Hello&nbsp;Summer&nbsp;,&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;warm&nbsp;welcome.&nbsp;  
&nbsp;&nbsp;  
&nbsp;1.The&nbsp;scenario&nbsp;is&nbsp;to&nbsp;display&nbsp;the&nbsp;user&nbsp;base&nbsp;of&nbsp;an&nbsp;organization/product&nbsp;spread&nbsp;across&nbsp;different&nbsp;cities,the&nbsp;user-hierarchy&nbsp;has&nbsp;3-4&nbsp;levels&nbsp;of&nbsp;users&nbsp;and&nbsp;the&nbsp;bottom&nbsp;level&nbsp;users&nbsp;sum&nbsp;up&nbsp;to&nbsp;a&nbsp;million&nbsp;as&nbsp;of&nbsp;now&nbsp;which&nbsp;is&nbsp;expected&nbsp;to&nbsp;grow&nbsp;2-3&nbsp;times&nbsp;at&nbsp;least&nbsp;by&nbsp;this&nbsp;year.The&nbsp;coordinates&nbsp;of&nbsp;these&nbsp;users&nbsp;based&nbsp;on&nbsp;their&nbsp;address&nbsp;are&nbsp;also&nbsp;available&nbsp;which&nbsp;I&nbsp;expect&nbsp;to&nbsp;show&nbsp;on&nbsp;the&nbsp;map.The&nbsp;groups&nbsp;can&nbsp;also&nbsp;be&nbsp;tagged&nbsp;to&nbsp;some&nbsp;location.The&nbsp;idea&nbsp;of&nbsp;clusterpointstyle&nbsp;looks&nbsp;good&nbsp;,&nbsp;but&nbsp;the&nbsp;question&nbsp;is&nbsp;how&nbsp;are&nbsp;these&nbsp;points&nbsp;mapped&nbsp;on&nbsp;the&nbsp;layout.how&nbsp;do&nbsp;I&nbsp;pass&nbsp;them&nbsp;to&nbsp;the&nbsp;API&nbsp;to&nbsp;be&nbsp;displayed&nbsp;at&nbsp;different&nbsp;zoom&nbsp;levels.How&nbsp;can&nbsp;the&nbsp;cities/states&nbsp;be&nbsp;highlighted&nbsp;at&nbsp;the&nbsp;same&nbsp;time.Your&nbsp;help&nbsp;will&nbsp;be&nbsp;greatly&nbsp;appreciated.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks…Kreez

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 3, 2013, 1:54am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/4 "2013-09-03T01:54:08Z")

</div>

Hi&nbsp;Kreez,  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;further&nbsp;information,&nbsp;attached&nbsp;is&nbsp;the&nbsp;sample&nbsp;code&nbsp;for&nbsp;your&nbsp;consideration,&nbsp;and&nbsp;here&nbsp;is&nbsp;a&nbsp;test&nbsp;vedio&nbsp;on&nbsp;our&nbsp;end&nbsp;for&nbsp;your&nbsp;information:&nbsp;[screencast.com/t/XdMlbm90anw](http://screencast.com/t/XdMlbm90anw)  
  
About&nbsp;How&nbsp;can&nbsp;the&nbsp;cities/states&nbsp;be&nbsp;highlighted&nbsp;at&nbsp;the&nbsp;same&nbsp;time?&nbsp;If&nbsp;the&nbsp;cities/states&nbsp;are&nbsp;from&nbsp;shape&nbsp;files.&nbsp;then&nbsp;a&nbsp;sample&nbsp;in&nbsp;HowDoIsample&nbsp;=\>Dynamic&nbsp;Shape=\>HighlightAFeatureOnTheMap&nbsp;should&nbsp;be&nbsp;helpful.

if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.

Best&nbsp;Regards

Summer

[Post11489.txt](https://community.thinkgeo.com/uploads/default/original/2X/f/fabe0bec0067aac1daf03c1671db0a1f8fe25154.txt) (2.58 KB)

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 3, 2013, 7:11am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/5 "2013-09-03T07:11:23Z")

</div>

Thanks&nbsp;a&nbsp;lot&nbsp;for&nbsp;the&nbsp;sample&nbsp;Summer.I&nbsp;appreciate&nbsp;the&nbsp;quick&nbsp;response.&nbsp;  
&nbsp;There&nbsp;are&nbsp;two&nbsp;questions&nbsp;I&nbsp;have&nbsp;on&nbsp;the&nbsp;sample&nbsp;(I&nbsp;was&nbsp;able&nbsp;to&nbsp;run&nbsp;it&nbsp;perfectly)&nbsp;  
&nbsp;&nbsp;  
&nbsp;1.&nbsp;When&nbsp;I&nbsp;change&nbsp;the&nbsp;Shape&nbsp;file&nbsp;to&nbsp;some&nbsp;other&nbsp;Shape&nbsp;file&nbsp;with&nbsp;correct&nbsp;extent&nbsp;details&nbsp;it&nbsp;does&nbsp;not&nbsp;display&nbsp;anything.I&nbsp;used&nbsp;the&nbsp;USStates.shp&nbsp;separately&nbsp;and&nbsp;along&nbsp;with&nbsp;the&nbsp;Countries02.shp&nbsp;&nbsp;  
&nbsp;2.Where&nbsp;do&nbsp;I&nbsp;set&nbsp;the&nbsp;co-ordinates&nbsp;for&nbsp;these&nbsp;points&nbsp;in&nbsp;the&nbsp;program.Assume&nbsp;I&nbsp;have&nbsp;all&nbsp;coordinates(lat,long)&nbsp;of&nbsp;the&nbsp;one&nbsp;million&nbsp;points&nbsp;how&nbsp;do&nbsp;I&nbsp;use&nbsp;them.&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;again&nbsp;.&nbsp;.&nbsp;.&nbsp;Kreez&nbsp;!!!

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 3, 2013, 10:05pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/6 "2013-09-03T22:05:58Z")

</div>

Hi&nbsp;Kreez,  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;query,  
  
  
  
About&nbsp;the&nbsp;first&nbsp;problem,&nbsp;with&nbsp;attached&nbsp;code&nbsp;in&nbsp;"firstProblem.txt",&nbsp;it&nbsp;should&nbsp;be&nbsp;displayed&nbsp;now.  
  
  
  
About&nbsp;the&nbsp;second&nbsp;problem,&nbsp;attahced&nbsp;code&nbsp;in&nbsp;"secondProblem.txt"&nbsp;should&nbsp;be&nbsp;one&nbsp;choice:  
  
  
  
Please&nbsp;not&nbsp;that&nbsp;once&nbsp;"shpLayer.FeatureSource.CommitTransaction();",&nbsp;then&nbsp;the&nbsp;data&nbsp;in&nbsp;the&nbsp;.shp&nbsp;file&nbsp;is&nbsp;also&nbsp;changed.  
  
  
  
if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.  
  
  
  
Best&nbsp;Regards  
  
  
  
Summer  
  
[firstProblem.txt](https://community.thinkgeo.com/uploads/default/original/2X/8/8af6db8bab331abedc98f17d6fb790df02b7a4dd.txt) (1.11 KB)  
[secondProblem.txt](https://community.thinkgeo.com/uploads/default/original/2X/a/aea1acb981c090deccbfd2cf65fecca40ca48893.txt) (948 Bytes)

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 4, 2013, 5:22am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/7 "2013-09-04T05:22:09Z")

</div>

Thanks&nbsp;for&nbsp;the&nbsp;samples&nbsp;Summer.Your&nbsp;examples&nbsp;work&nbsp;fine.But&nbsp;whenever&nbsp;I&nbsp;modify&nbsp;it&nbsp;to&nbsp;do&nbsp;what&nbsp;I&nbsp;need,I&nbsp;don’t&nbsp;see&nbsp;anything&nbsp;on&nbsp;the&nbsp;Map.&nbsp;May&nbsp;be&nbsp;I&nbsp;am&nbsp;being&nbsp;repetitive&nbsp;but&nbsp;let&nbsp;me&nbsp;explain&nbsp;what&nbsp;I&nbsp;need&nbsp;to&nbsp;do.&nbsp;I&nbsp;have&nbsp;some&nbsp;1&nbsp;million&nbsp;users&nbsp;divided&nbsp;into&nbsp;different&nbsp;groups&nbsp;spread&nbsp;across&nbsp;different&nbsp;cities&nbsp;in&nbsp;a&nbsp;country.I&nbsp;want&nbsp;to&nbsp;show&nbsp;these&nbsp;users&nbsp;on&nbsp;the&nbsp;map&nbsp;based&nbsp;on&nbsp;their&nbsp;street&nbsp;addresses.&nbsp;  
&nbsp;&nbsp;  
&nbsp;As&nbsp;you&nbsp;suggested&nbsp;may&nbsp;be&nbsp;clusterpointstyle&nbsp;is&nbsp;the&nbsp;way&nbsp;to&nbsp;go&nbsp;where&nbsp;you&nbsp;can&nbsp;also&nbsp;chose&nbsp;to&nbsp;have&nbsp;your&nbsp;own\*&nbsp;images.Am&nbsp;I&nbsp;correct&nbsp;in&nbsp;saying&nbsp;that&nbsp;to&nbsp;put&nbsp;a&nbsp;marker&nbsp;at&nbsp;a&nbsp;specific&nbsp;location&nbsp;on&nbsp;the&nbsp;map&nbsp;using&nbsp;LAT-LONG&nbsp;we&nbsp;need&nbsp;to&nbsp;add&nbsp;a&nbsp;Feature&nbsp;to&nbsp;the&nbsp;Layers?&nbsp;  
&nbsp;&nbsp;  
&nbsp;`So how do I add these LAT-LONG information to the MAP and how do I ensure that these will be rendered as clusters for initial levels. `&nbsp;  
&nbsp;&nbsp;  
&nbsp;Whenever&nbsp;I&nbsp;add&nbsp;a&nbsp;new&nbsp;feature&nbsp;to&nbsp;any&nbsp;layers&nbsp;it&nbsp;doesn’t&nbsp;render&nbsp;anything.As&nbsp;I&nbsp;have&nbsp;mentioned&nbsp;in&nbsp;my&nbsp;first&nbsp;post&nbsp;FeatureSourceMarkerOverlay&nbsp;,&nbsp;ShapeFileFeatureLayer&nbsp;+&nbsp;&nbsp;InMemoryMarkerOverlay&nbsp;did&nbsp;not&nbsp;help&nbsp;too.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks…Kreez&nbsp;!!!&nbsp;

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [September 5, 2013, 1:02am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/8 "2013-09-05T01:02:37Z")

</div>

Hi&nbsp;Kreez,&nbsp;  
  
  
  
The&nbsp;firstProblem.txt&nbsp;code&nbsp;shows&nbsp;USStates.shp&nbsp;and&nbsp;Countries02.shp&nbsp;in&nbsp;map.&nbsp;  
  
  
  
The&nbsp;secondProblem.txt&nbsp;code&nbsp;shows&nbsp;how&nbsp;to&nbsp;add&nbsp;a&nbsp;point&nbsp;in&nbsp;map&nbsp;where&nbsp;you&nbsp;clicked.&nbsp;  
  
  
  
If&nbsp;you&nbsp;want&nbsp;to&nbsp;plot&nbsp;a&nbsp;marker&nbsp;at&nbsp;a&nbsp;specified&nbsp;location&nbsp;on&nbsp;map&nbsp;using&nbsp;LatLon,&nbsp;you&nbsp;need&nbsp;add&nbsp;a&nbsp;feature&nbsp;in&nbsp;ShapeFileFeatureLayer&nbsp;+&nbsp;InMemoryMarkerOverlay.&nbsp;So&nbsp;you’re&nbsp;right&nbsp;about&nbsp;this&nbsp;point.&nbsp;  
  
  
  
If&nbsp;you&nbsp;have&nbsp;a&nbsp;LatLon&nbsp;data,&nbsp;just&nbsp;create&nbsp;a&nbsp;point&nbsp;shape&nbsp;based&nbsp;it,&nbsp;then&nbsp;create&nbsp;feature&nbsp;based&nbsp;the&nbsp;point&nbsp;shape&nbsp;and&nbsp;add&nbsp;this&nbsp;feature&nbsp;to&nbsp;your&nbsp;layer.&nbsp;  
  
  
  
double&nbsp;lon&nbsp;=&nbsp;80;  
  
  
double&nbsp;lat&nbsp;=&nbsp;80;  
  
  
PointShape&nbsp;point&nbsp;=&nbsp;new&nbsp;PointShape(80,&nbsp;80);  
  
  
layer.FeatureSource.AddFeature(point);  
  
  
  
And&nbsp;the&nbsp;ClusterPointStyle&nbsp;should&nbsp;be&nbsp;assigned&nbsp;to&nbsp;the&nbsp;layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.&nbsp;  
  
  
  
Please&nbsp;view&nbsp;the&nbsp;code&nbsp;in&nbsp;this&nbsp;sample&nbsp;for&nbsp;more&nbsp;detail&nbsp;code:  
  
  
  
[wiki.thinkgeo.com/wiki/Map\_Suite\_Desktop\_Edition\_Styles\_Samples#ClusterPointStyle](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Styles_Samples#ClusterPointStyle)&nbsp;  
  
  
  
Regards,&nbsp;  
  
  
  
Don

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 5, 2013, 5:13am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/9 "2013-09-05T05:13:52Z")

</div>

Hi&nbsp;Kreez,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;further&nbsp;information,&nbsp;there&nbsp;are&nbsp;some&nbsp;Supplement&nbsp;I’d&nbsp;like&nbsp;to&nbsp;add&nbsp;for&nbsp;ethans&nbsp;reply.&nbsp;  
&nbsp;&nbsp;  
&nbsp;1.ShapeFileFeatureLayer&nbsp;+&nbsp;InMemoryMarkerOverlay,&nbsp;say&nbsp;FeatureSourceMarkerOverlay&nbsp;is&nbsp;not&nbsp;applicable&nbsp;for&nbsp;current&nbsp;situation,&nbsp;because&nbsp;clusterpointstyle&nbsp;is&nbsp;not&nbsp;applicable&nbsp;for&nbsp;FeatureSourceMarkerOverlay.&nbsp;And&nbsp;without&nbsp;using&nbsp;clusterpointstyle,&nbsp;2-3&nbsp;millions&nbsp;marker&nbsp;will&nbsp;make&nbsp;the&nbsp;performance&nbsp;very&nbsp;slow.&nbsp;  
&nbsp;&nbsp;  
&nbsp;2.If&nbsp;you&nbsp;want&nbsp;to&nbsp;add&nbsp;your&nbsp;lat-long&nbsp;information&nbsp;to&nbsp;map,&nbsp;there&nbsp;are&nbsp;two&nbsp;ways&nbsp;to&nbsp;add&nbsp;them,&nbsp;first&nbsp;one&nbsp;is&nbsp;to&nbsp;add&nbsp;them&nbsp;to&nbsp;inmLayer&nbsp;with&nbsp;&nbsp;  
&nbsp;inmLayer.InternalFeatures.Add(yourlat,yourlong),&nbsp;but&nbsp;millions&nbsp;of&nbsp;data&nbsp;will&nbsp;bring&nbsp;some&nbsp;performance&nbsp;issue&nbsp;not&nbsp;just&nbsp;in&nbsp;the&nbsp;map.refresh()&nbsp;but&nbsp;also&nbsp;in&nbsp;the&nbsp;adding&nbsp;inmLayer.InternalFeatures.Add(yourlat,yourlong).&nbsp;  
&nbsp;&nbsp;  
&nbsp;So,&nbsp;we&nbsp;suggest&nbsp;you&nbsp;to&nbsp;use&nbsp;add&nbsp;these&nbsp;lat-long&nbsp;information&nbsp;into&nbsp;a&nbsp;shapefile&nbsp;then&nbsp;use&nbsp;ShapeFileFeatureLayer&nbsp;to&nbsp;display&nbsp;them&nbsp;with&nbsp;clusterpointstyle.&nbsp;About&nbsp;creating&nbsp;shapefile,&nbsp;here&nbsp;is&nbsp;a&nbsp;helpful&nbsp;link&nbsp;for&nbsp;you&nbsp;to&nbsp;create&nbsp;shapefile.&nbsp;[thinkgeo.com/forums/MapSuite/tabid/143/aft/5399/Default.aspx](http://thinkgeo.com/forums/MapSuite/tabid/143/aft/5399/Default.aspx).&nbsp;then&nbsp;the&nbsp;code&nbsp;in&nbsp;“Post11489.txt”&nbsp;could&nbsp;be&nbsp;applicable.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;add&nbsp;or&nbsp;update&nbsp;feature&nbsp;into&nbsp;one&nbsp;shapefile&nbsp;then&nbsp;you&nbsp;could&nbsp;use&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;shpLayer.FeatureSource.BeginTransaction();&nbsp;  
&nbsp;shpLayer.FeatureSource.UpdateFeature(featureyouwanttoupdate);[//shpLayer.FeatureSource.AddFeature](https://shpLayer.FeatureSource.AddFeature)(new&nbsp;feature(yourlat,yourlong));&nbsp;  
&nbsp;shpLayer.FeatureSource.CommitTransaction();&nbsp;  
&nbsp;&nbsp;  
&nbsp;About&nbsp;“ensure&nbsp;that&nbsp;these&nbsp;will&nbsp;be&nbsp;rendered&nbsp;as&nbsp;clusters&nbsp;for&nbsp;initial&nbsp;levels”,&nbsp;if&nbsp;you&nbsp;want&nbsp;the&nbsp;data&nbsp;in&nbsp;shapefilefeaturelayer&nbsp;to&nbsp;use&nbsp;culsterpointstyle&nbsp;from&nbsp;zoomlevel01&nbsp;to&nbsp;zoomlevel04&nbsp;then&nbsp;you&nbsp;could&nbsp;use&nbsp;following&nbsp;code&nbsp;  
&nbsp;&nbsp;  
&nbsp;ShapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(clusterPointStyle1);&nbsp;  
&nbsp;ShapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel&nbsp;=&nbsp;ApplyUntilZoomLevel.Level04;&nbsp;  
&nbsp;&nbsp;  
&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 5, 2013, 5:48am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/10 "2013-09-05T05:48:59Z")

</div>

&nbsp;Hi&nbsp;Don&nbsp;,&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;pointers.&nbsp;Below&nbsp;is&nbsp;the&nbsp;code&nbsp;that&nbsp;I&nbsp;had&nbsp;written&nbsp;earlier&nbsp;and&nbsp;was&nbsp;stuck&nbsp;on&nbsp;how&nbsp;to&nbsp;optimize&nbsp;this&nbsp;code&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;show&nbsp;a&nbsp;million&nbsp;points&nbsp;on&nbsp;the&nbsp;map&nbsp;that&nbsp;would&nbsp;be&nbsp;rendered&nbsp;in&nbsp;clusters&nbsp;in&nbsp;the&nbsp;initial&nbsp;zoom&nbsp;levels&nbsp;and&nbsp;then&nbsp;show&nbsp;the&nbsp;actual&nbsp;points&nbsp;with&nbsp;zoom&nbsp;  
&nbsp;`private void Map1_Loaded(object sender, RoutedEventArgs e)        {                        Map1.MapUnit = GeographyUnit.DecimalDegree;            Map1.CurrentExtent = new RectangleShape(-128, 51, -65, 19);            Map1.Background = new SolidColorBrush(Colors.Honeydew);//Color.FromRgb(148, 196, 243));                        //Country            ShapeFileFeatureLayer countriesLayer = new ShapeFileFeatureLayer(@"…\data\Countries02.shp");            countriesLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.LightSteelBlue, GeoColor.StandardColors.MidnightBlue);            countriesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;            LayerOverlay loy = new LayerOverlay();            loy.Layers.Add(countriesLayer);                        //States            ShapeFileFeatureLayer shapeFileFeatureLayer = new ShapeFileFeatureLayer(@"…\data2\USStates.shp");            shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(new AreaStyle(new GeoPen(GeoColor.StandardColors.Black, 1), new GeoSolidBrush(GeoColor.StandardColors.SteelBlue)));            shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(PointStyles.CreateSimpleCircleStyle(GeoColor.StandardColors.Turquoise, 8, GeoColor.StandardColors.Black));            shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;            //Adds the ShapeFileFeatureLayer to an LayerOverlay.            loy.Layers.Add(shapeFileFeatureLayer);            Map1.Overlays.Add(loy);            InMemoryMarkerOverlay markerOverlay = new InMemoryMarkerOverlay();                       //Create 5 random points and add to the marker overlay            PointShape p1 = new PointShape(-95.2806, 38.9554);            PointShape p2 = new PointShape(-96.2806, 39.9554);            PointShape p3 = new PointShape(-97.2806, 40.9554);            PointShape p4 = new PointShape(-98.2806, 41.9554);            PointShape p5 = new PointShape(-99.2806, 42.9554);            Feature f1 = new Feature(p1);            Feature f2 = new Feature(p2);            Feature f3 = new Feature(p3);            Feature f4 = new Feature(p4);            Feature f5 = new Feature(p5);                            Uri uru = new Uri(@"…\Images\uparrow.png", UriKind.RelativeOrAbsolute);            markerOverlay.ZoomLevelSet.ZoomLevel05.DefaultPointMarkerStyle.ImageSource = new BitmapImage(uru);            markerOverlay.ZoomLevelSet.ZoomLevel05.DefaultPointMarkerStyle.Width = 16;            markerOverlay.ZoomLevelSet.ZoomLevel05.DefaultPointMarkerStyle.Height = 16;            markerOverlay.ZoomLevelSet.ZoomLevel05.DefaultPointMarkerStyle.ToolTip = "You are Here";            markerOverlay.ZoomLevelSet.ZoomLevel05.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;            markerOverlay.FeatureSource.BeginTransaction();                       markerOverlay.FeatureSource.AddFeature(f1);            markerOverlay.FeatureSource.AddFeature(f2);            markerOverlay.FeatureSource.AddFeature(f3);            markerOverlay.FeatureSource.AddFeature(f4);            markerOverlay.FeatureSource.AddFeature(f5);            markerOverlay.FeatureSource.CommitTransaction();            Map1.Overlays.Add(markerOverlay);            Map1.Refresh();                  } `&nbsp;  
&nbsp;&nbsp;  
&nbsp;can&nbsp;you&nbsp;help&nbsp;me&nbsp;modify&nbsp;this&nbsp;code&nbsp;to&nbsp;achieve&nbsp;what&nbsp;I&nbsp;am&nbsp;trying&nbsp;to&nbsp;do&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;.&nbsp;.&nbsp;.&nbsp;Kreez&nbsp;!!!&nbsp;

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 5, 2013, 5:55am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/11 "2013-09-05T05:55:09Z")

</div>

Hi&nbsp;Summer&nbsp;Sorry,&nbsp;I&nbsp;did&nbsp;not&nbsp;see&nbsp;that&nbsp;you&nbsp;had&nbsp;replied.Thanks&nbsp;for&nbsp;the&nbsp;details.I&nbsp;shall&nbsp;try&nbsp;to&nbsp;do&nbsp;that.But&nbsp;as&nbsp;I&nbsp;mentioned&nbsp;in&nbsp;one&nbsp;of&nbsp;my&nbsp;earlier&nbsp;posts&nbsp;the&nbsp;data&nbsp;may&nbsp;change&nbsp;incrementally&nbsp;so&nbsp;if&nbsp;I&nbsp;add&nbsp;the&nbsp;features&nbsp;to&nbsp;a&nbsp;shape&nbsp;file&nbsp;and&nbsp;modify&nbsp;it&nbsp;I&nbsp;will&nbsp;not&nbsp;be&nbsp;able&nbsp;to&nbsp;use&nbsp;it&nbsp;for&nbsp;a&nbsp;different&nbsp;filter.&nbsp;The&nbsp;data&nbsp;that&nbsp;is&nbsp;displayed&nbsp;on&nbsp;a&nbsp;day&nbsp;will\*&nbsp;change&nbsp;in&nbsp;a&nbsp;week&nbsp;or&nbsp;a&nbsp;month&nbsp;or&nbsp;even&nbsp;the&nbsp;next&nbsp;day.  
  
  
  
Also&nbsp;there&nbsp;are&nbsp;multiple&nbsp;filters&nbsp;on&nbsp;the&nbsp;UI&nbsp;screen&nbsp;that&nbsp;run&nbsp;on&nbsp;the&nbsp;million&nbsp;users.Which&nbsp;will&nbsp;return&nbsp;the&nbsp;subset&nbsp;of&nbsp;users.  
  
  
  
For&nbsp;Ex:&nbsp;One&nbsp;view&nbsp;could&nbsp;be&nbsp;rendering&nbsp;all&nbsp;the&nbsp;million&nbsp;users&nbsp;as&nbsp;points&nbsp;on&nbsp;the&nbsp;map,&nbsp;the&nbsp;second&nbsp;view&nbsp;could&nbsp;be&nbsp;based&nbsp;on&nbsp;a&nbsp;filter&nbsp;where&nbsp;different&nbsp;types&nbsp;of&nbsp;users&nbsp;who&nbsp;are&nbsp;the&nbsp;subset&nbsp;of&nbsp;these&nbsp;same&nbsp;million&nbsp;users&nbsp;must&nbsp;be&nbsp;displayed…&nbsp;  
  
  
  
Thanks…Kreez&nbsp;!!!

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 5, 2013, 9:15pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/12 "2013-09-05T21:15:20Z")

</div>

Hi&nbsp;Kreez,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;further&nbsp;information,&nbsp;about&nbsp;your&nbsp;post&nbsp;in&nbsp;"09-05-2013&nbsp;10:47&nbsp;AM"&nbsp;this&nbsp;is&nbsp;because&nbsp;you&nbsp;used&nbsp;markerOverlay.ZoomLevelSet.ZoomLevel05,&nbsp;so&nbsp;the&nbsp;markers&nbsp;will&nbsp;apear&nbsp;in&nbsp;zoomlevel5,&nbsp;following&nbsp;guiding&nbsp;vedio&nbsp;could&nbsp;show&nbsp;when&nbsp;the&nbsp;markers&nbsp;will&nbsp;display:&nbsp;[screencast.com/t/NkKocnofin4](http://screencast.com/t/NkKocnofin4)&nbsp;  
&nbsp;&nbsp;  
&nbsp;About&nbsp;the&nbsp;your&nbsp;post&nbsp;in&nbsp;"09-05-2013&nbsp;10:54&nbsp;AM",&nbsp;could&nbsp;I&nbsp;make&nbsp;a&nbsp;confirmation&nbsp;with&nbsp;you?&nbsp;Are&nbsp;the&nbsp;datas&nbsp;are&nbsp;stored&nbsp;in&nbsp;database&nbsp;and&nbsp;in&nbsp;different&nbsp;tables(each&nbsp;table&nbsp;has&nbsp;a&nbsp;&nbsp;user-hierarchy)?&nbsp;if&nbsp;yes,&nbsp;then&nbsp;you&nbsp;could&nbsp;use&nbsp;one&nbsp;MsSql2008FeatureLayer&nbsp;for&nbsp;one&nbsp;table&nbsp;with&nbsp;cluster&nbsp;pointstyle&nbsp;to&nbsp;replace&nbsp;using&nbsp;ShapeFileFeatureLayer,&nbsp;and&nbsp;this&nbsp;way&nbsp;the&nbsp;filtering&nbsp;could&nbsp;be&nbsp;acheived.&nbsp;And&nbsp;once&nbsp;the&nbsp;data&nbsp;in&nbsp;the&nbsp;database&nbsp;is&nbsp;changed&nbsp;then&nbsp;the&nbsp;data&nbsp;in&nbsp;the&nbsp;map&nbsp;will&nbsp;be&nbsp;changed&nbsp;too.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Waiting&nbsp;for&nbsp;your&nbsp;futher&nbsp;information.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer

---

<div class="post-metadata">

**Author:** ![Kreez](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kreez](https://community.thinkgeo.com/u/Kreez)\
**Post date:** [September 6, 2013, 4:36am UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/13 "2013-09-06T04:36:18Z")

</div>

Hi&nbsp;Summer,&nbsp;  
  
Thanks&nbsp;for&nbsp;the&nbsp;Screencast&nbsp;and&nbsp;the&nbsp;details.&nbsp;I&nbsp;put&nbsp;the&nbsp;ZoomLevel&nbsp;as&nbsp;05&nbsp;on&nbsp;purpose&nbsp;so&nbsp;that&nbsp;I&nbsp;could&nbsp;give&nbsp;the&nbsp;levels&nbsp;01-04&nbsp;a&nbsp;different&nbsp;style&nbsp;(cluster&nbsp;style)&nbsp;which&nbsp;didn’t&nbsp;work.And&nbsp;I&nbsp;understand&nbsp;that&nbsp;you&nbsp;can’t&nbsp;set&nbsp;a&nbsp;cluster&nbsp;style&nbsp;to&nbsp;InMemoryMarkerOverlay.&nbsp;&nbsp;&nbsp;  
  
  
  
Regarding&nbsp;the&nbsp;data,&nbsp;YES&nbsp;the&nbsp;location&nbsp;is&nbsp;stored&nbsp;in&nbsp;the&nbsp;database&nbsp;something&nbsp;like&nbsp;&nbsp;  
  
  
  
` UserId | GroupId | UserName | Corodinates       1   |   1     |   abcd   |   90.090,12.908 `&nbsp;  
  
  
  
Could&nbsp;you&nbsp;please&nbsp;share&nbsp;more&nbsp;details&nbsp;on&nbsp;how&nbsp;I&nbsp;can&nbsp;use&nbsp;the&nbsp;SQLServer&nbsp;feature&nbsp;for&nbsp;my&nbsp;need.&nbsp;Will&nbsp;it&nbsp;allow&nbsp;me&nbsp;to&nbsp;view/highlight&nbsp;different&nbsp;STATES&nbsp;/&nbsp;CITIES&nbsp;provided&nbsp;I&nbsp;have&nbsp;the&nbsp;shape&nbsp;files.i.e&nbsp;I&nbsp;may&nbsp;also&nbsp;want&nbsp;to&nbsp;add&nbsp;a&nbsp;filter&nbsp;based&nbsp;on&nbsp;the&nbsp;City.&nbsp;  
  
  
  
Thanks&nbsp;.&nbsp;.&nbsp;.&nbsp;Kreez&nbsp;!!!

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [September 8, 2013, 10:12pm UTC](https://community.thinkgeo.com/t/very-large-number-of-markers-clickable/3497/14 "2013-09-08T22:12:48Z")

</div>

Hi&nbsp;Kreez,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;futher&nbsp;information,&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;the&nbsp;field&nbsp;UserId&nbsp;is&nbsp;playing&nbsp;a&nbsp;role&nbsp;of&nbsp;column&nbsp;id&nbsp;and&nbsp;the&nbsp;field&nbsp;Corodinates&nbsp;is&nbsp;a&nbsp;geometry&nbsp;type&nbsp;then,&nbsp;following&nbsp;code&nbsp;could&nbsp;be&nbsp;used：&nbsp;  
&nbsp;MsSql2008FeatureLayer&nbsp;sql2008Layer&nbsp;=&nbsp;new&nbsp;MsSql2008FeatureLayer(connectString,&nbsp;yourUserTable,&nbsp;"UserId");&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;"I&nbsp;have&nbsp;the&nbsp;shape&nbsp;files"&nbsp;means&nbsp;that&nbsp;"I&nbsp;have&nbsp;the&nbsp;shape&nbsp;files&nbsp;for&nbsp;the&nbsp;states&nbsp;and&nbsp;cities",&nbsp;then&nbsp;to&nbsp;filter&nbsp;the&nbsp;users&nbsp;by&nbsp;states&nbsp;could&nbsp;use&nbsp;following&nbsp;code:&nbsp;  
&nbsp;&nbsp;  
&nbsp;Collection\<Feature\>&nbsp;stateToFilter=&nbsp;statesShpFileFeatureLayer.FeatureSource.GetFeaturesByColumnValue(cityNameColumn,&nbsp;"yourcityname")[0];&nbsp;  
&nbsp;Collection\<Feature\>&nbsp;usersInState&nbsp;=&nbsp;sql2008Layer.FeatureSource.GetFeaturesInsideBoundingBox(stateToFilter[0].GetBoundingBox(),&nbsp;ReturningColumnsType.AllColumns);&nbsp;  
&nbsp;&nbsp;  
&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer
