I published a map that contains layers which use representations. I want to use these layers as Feature Layers in a web map, but when I add them to the map element, the symbology is different. Is there a way to keep the representation symbology? I read here that Feature Classes take the drawing information from the server, but in my case the symbology is totally different.
Solved! Go to Solution.
From the overview on Feature Layers, it looks like cartographic representations are not available with Feature Layers.
- Selection only mode does not initially request any features. Features are added only when a selection is made. This mode is useful when you cannot or do not want to bring all features into the client, but you want to highlight one or more features for a certain reason.
For example, suppose you have a roads layer that's configured to use cartographic representations, which are not supported for display using a feature layer. You want to perform some Web editing on the roads, but that requires a feature layer. What do you do?
In this scenario, you configure a dynamic map service to show the roads, then use a feature layer with selection only mode to display just the road currently being edited. This selected road is drawn using a simple client-side symbol. Once the edit is applied, you can clear the selection and refresh the dynamic map service to see the updated roads.
Raluca,
are you able to share a link to that service? Or show the code that you are using? Because it should show the symbology you used unless you specify it in your code to use different symbology .
Tim
Hi Tim,
If I use
dynamicMapService = new ArcGISDynamicMapServiceLayer(url);
map.addLayer(dynamicMapService);
then the layers are rendered using the representations.
But if I add the service as a feature layer:
featureLayer = new FeatureLayer(url + "13");
map.addLayer(featureLayer);
then my hiking trails are represented only with a green line...
Thank you for your help!
Raluca
From the overview on Feature Layers, it looks like cartographic representations are not available with Feature Layers.
- Selection only mode does not initially request any features. Features are added only when a selection is made. This mode is useful when you cannot or do not want to bring all features into the client, but you want to highlight one or more features for a certain reason.
For example, suppose you have a roads layer that's configured to use cartographic representations, which are not supported for display using a feature layer. You want to perform some Web editing on the roads, but that requires a feature layer. What do you do?
In this scenario, you configure a dynamic map service to show the roads, then use a feature layer with selection only mode to display just the road currently being edited. This selected road is drawn using a simple client-side symbol. Once the edit is applied, you can clear the selection and refresh the dynamic map service to see the updated roads.
Thanks Ken, this is what I was looking for.