Thursday 20 September 2018

arcgis javascript api - How can I retrieve the features in a layer without adding it to a map?


I am using the ArcGIS API for JavaScript.


My layer of Point features is exposed through a REST service. I want to retrieve all of these features when the application starts up, then show different subsets of features at different times, depending on user input (such as text search) and client-side calculations (such as clustering calculations). If I just create a FeatureLayer normally, it won't actually retrieve any features before it's added to a map -- its graphics property is just [] when I look at it in Firebug. I tried calling FeatureLayer.refresh, but it just complains that map is undefined.


How do I retrieve the features without having to attach them to a map?





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...