Hi
Is there any possibility to use SQL Table instead of CSV to visualize points with heat map..???
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=visualization-heatmap
Robert Scheitlin, GISP Egge-Jan Pollé Kelly Hutchins
Robert..
i have called json service and got data in console. But when i use code from this sample https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-featurelayer-collection and try to got data with featureCollection, i received "undefined". How can i create featureCollection??
Response from JSON service
<SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"data"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"OBJECTID"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">146</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Splitter"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"64"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Comment"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"DHA Phase05"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Name"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Plaza POP ODB 02"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"ID"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"2100604"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Placement"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Aerial"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"POP"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">21006</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Shape"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"srid"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">32642</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"version"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"points"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"x"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">301997.6824000003</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"y"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">2746232.8489999995</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"z"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"m"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"figures"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"attribute"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"pointOffset"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"shapes"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"parentOffset"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"figureOffset"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"segments"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">]</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Thank you Robert i will try this.
Use esriRequest to call the json service and get your data. Shown in this sample.
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=request
Then use code from this sample to create FeatureLayer from that data.
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-featurelayer-collection
Once you have a FeatureLayer apply the HeatMap renderer to it.
Egge-Jan Pollé
I have created my own json service using express. How can i use it with arcgis api...??
Robert Scheitlin, GISP
I have created json service by using express.. Can i use this json service to create heat map..???
I don't think so. Unless you have the ability to make a layer (of some supported type) out of that tables data. I suppose if the SQL Table is from a Geodatabase or you have a web service that allows the query of the tables data, then you could create client side graphics in a FeatureLayer from that.
Hi kawish abbas,
Yeah, I suppose you can apply the renderer to any kind of point layer.
Cheers,
Egge-Jan
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.