Select to view content in your preferred language

Usage of a FeatureLayer backed by a map service (instead of FeatureService)

733
2
01-29-2014 05:57 AM
JamieSimko
Regular Contributor
Does anyone know the differences between a FeatureLayer initialized with a MapService url and a FeatureLayer initialized with a FeatureService url? I can't find this clearly defined anywhere.

I'm guessing the former has isEditable() = false and the latter has isEditable() = true. Is there anymore to it than that?

Would FeatureLayers w/ MapServices backing them fall into the same use case as creating a queryTask and loading the results into a GraphicsLayer?

Thanks for any input on this.
- Jamie
0 Kudos
2 Replies
derekswingley1
Deactivated User
You're first part is right�?? you can use either a map or feature service url to drive a feature layer. In the case of using a map service url, the feature layer will be read-only.

I don't understand this part:
Would FeatureLayers w/ MapServices backing them fall into the same use case as creating a queryTask and loading the results into a GraphicsLayer?


If you're using a feature layer, use its queryFeatures method rather than creating and executing a query task. They'll do the same thing but the feature layer approach takes less code.
0 Kudos
JamieSimko
Regular Contributor
Thanks for the clarification. Your answer for the 2nd part is pretty much what I was wondering about. I guess there probably isn't as much discussion on this as I thought there would be.
0 Kudos