Clustering from a maps graphic layer

906
2
08-19-2013 05:08 PM
AndrewDavis
New Contributor
Hello,
I have a dynamically generated graphics layer which is populated from a large JSON.  I am able to add this to the map, without problem.

I want to take the same data.response object and use it to create either a heat map or a clustered graphics layer.

All of the examples I have worked with are using a query to a feature service.

Has anyone seen or worked with using a data object instead?

Andy
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
The clustering sample loads a .json file and creates clusters from it.
0 Kudos
AndrewDavis
New Contributor
The clustering sample loads a .json file and creates clusters from it.


Thanks for the reply..
I am looking at the page and it is one that I have used before.  I may be missing something here..

map.on("load", function() {    
            domStyle.set(query("a.action.zoomTo")[0], "display", "none"); 
            var photos = esriRequest({               
                "url": "data/1000-photos.json", 
                "handleAs": "json"             
});             
photos.then(addClusters, error);          
 });


If my graphicLayer is a dynamically built layer that I already have on the map is there a call needed like above to a url where I would query the data?  (meaning the photos json object).  When I set the var 'photos' as equal to an esriRequest how would you give it a url if it is not available on my server, but is a returned data object from a solr query?

Andy...
0 Kudos