FeatureLayer from FeatureCollection

5648
13
Jump to solution
09-21-2015 06:02 AM
GregKnight
Occasional Contributor

I am trying to create a polygon feature layer from a feature collection. I have modified the Flickr sample to use polygon geometries, rather than point geometries. The features are not getting added to the layer properly. I have put together a JSFiddle here that illustrates the problem.

JSFiddle

I have commented out line 137 where I add the features to the layer, as this results in the map turning white.  While the API doesn't display any errors in the console, I don't get the results on the map either.  What am I missing? 

0 Kudos
13 Replies
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   Sure that is what I do in the eSearch.

0 Kudos
LefterisKoumis
Occasional Contributor III

Yes, but the layerdefinition is esearch is derived from the configuration file. In my case, there is no config file. I'm trying to dynamically develop the layerdefintion  from the json similar to the process posted at:

Request layer info | ArcGIS API for JavaScript

but so far I seem to be missing something...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   No ,the layerdefinition is derived from the ArcGIS server layer layer info using a esriRequest based on the URL that is in the configuration file.

0 Kudos
LefterisKoumis
Occasional Contributor III

oops. I was looking at the getOutputfileds function instead of the _getLayerInfoWithRelationships function.

0 Kudos