Hi,
I have a performance issue creating 1000 markers on ArcGIS map.
Below is a demo code snippet.
<SPAN class="pln" style="font-size: 13px; color: #000000;">geo_map </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">new</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> esri</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Map</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Ext</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">getCmp</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="str" style="font-size: 13px; color: #800000;">'geo_map'</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">).</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">body</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">id</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">{</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
basemap</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">:</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="str" style="font-size: 13px; color: #800000;">"topo"</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
center</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">:</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">[</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;"><SPAN class="pun" style="color: #666600;">-</SPAN><SPAN class="lit" style="color: #006666;">96</SPAN><SPAN class="pun" style="color: #666600;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="lit" style="color: #006666;">37</SPAN>],</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
zoom</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">:</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="lit" style="font-size: 13px; color: #800000;">4</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">});</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">geo_map</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">on</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="str" style="font-size: 13px; color: #800000;">"load"</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">function</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">()</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">{</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;"></SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">GetMarkers</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">me</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> geo_map</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> config_settings</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> map_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> test_status</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">});</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">function</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">GetMarkers</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">obj</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> map</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> config_settings</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> map_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> test_status</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">){</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Ext</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Object</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">each</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">map_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">function</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">marker_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">){</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> lng </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> marker_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">lng</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">;</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> lat </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> marker_data</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">lat</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">;</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> marker_icon </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="str" style="font-size: 13px; color: #800000;"><SPAN>"</SPAN><A class="jive-link-external-small" href="http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|C0C0C0" rel="nofollow noopener noreferrer" target="_blank">http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|C0C0C0</A><SPAN>|"</SPAN></SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">;</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> marker</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">new</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> esri</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">layers</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">GraphicsLayer</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">();</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> p </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">new</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> esri</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">geometry</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Point</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">lng</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> lat</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> s </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">new</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> esri</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">symbol</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">PictureMarkerSymbol</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">marker_icon</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="lit" style="font-size: 13px; color: #800000;">51</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="lit" style="font-size: 13px; color: #800000;">51</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">var</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> g </SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">=</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 13px; color: #00008b;">new</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> esri</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="typ" style="font-size: 13px; color: #2b91af;">Graphic</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">p</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">,</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;"> s</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="com" style="font-size: 13px; color: #808080;">//console.log(marker);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
marker</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">add</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">g</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
map</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">.</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">addLayer</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">(</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">marker</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">);</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">}</SPAN><SPAN class="pln" style="font-size: 13px; color: #000000;">
</SPAN><SPAN class="pun" style="font-size: 13px; color: #000000;">}</SPAN>This is just a sample code. I get stop script error on all browser. The same code works fine for Google maps with 10000 markers. Is there any alternate way of creating markers in ArcGIS to improvise?