Select to view content in your preferred language

Edit widget providing access to dynamic layers - weird!!!

1147
6
12-09-2011 04:11 AM
SimonMorgan
Frequent Contributor
I have a layer in my main config:

<layer label="Park District Base Map" type="dynamic" visible="true"
       url="http://[server]/ArcGIS/rest/services/TRPD_BaseMap/MapServer"/>

It is desgined to just be your basic base map layers. I did NOT intend for it to be editable but the service DOES have feature service enabled for other purposes. It allowed me to add a new feature to some of the feature classes even though it is in ths particular app as dynamic.

However, ALL the layers display in the edit widget.

I also have a number of layers in this map that are feature and they all displayed in the edit widget until I changed rest end point to MapServer but kept the type as feature. These do NOT display in the edit widget as intended. For example:

<layer label="Reservations - School Groups" type="feature" visible="false"
       url="http://[server]/ArcGIS/rest/services/swan/CRANE_alldata/MapServer/3"/>

Has anyone else seen this behavior?
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Simon,

   All you need to do is exclude the unwanted layers in the EditWidget.xml

<excludelayer>Park District Base Map</excludelayer>
and change the others back to type="feature" and url="http://[server]/ArcGIS/rest/services/swan/CRANE_alldata/FeatureServer/3"/>
0 Kudos
SimonMorgan
Frequent Contributor
Simon,

   All you need to do is exclude the unwanted layers in the EditWidget.xml

<excludelayer>Park District Base Map</excludelayer>
and change the others back to type="feature" and url="http://[server]/ArcGIS/rest/services/swan/CRANE_alldata/FeatureServer/3"/>


My apologies I did not explain very well. I know how to fix this. The ones that are type feature and point ot the mapserver endpoint are INTENDED to be that way, so no issue there.

As for the exclude layer, I had already done that, it just seems that at 2,4 I did not need to for a DYNAMIC layer. Maybe this is a bug? My concern is that when I migrate all my current apps from 2.3.1 to 2.5 I will need to go in and do a whole bunch of exclude layer entries that I did not need to do before.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   It is not a bug, it seems that it is a feature that was added as in the code they are calling createFeatureLayersFromDynamicMapService for all DynamicMapServices to see if there is a corresponding FeatureService and if there is present that as an editable layer. So yes it seems you have to do the extra steps of excluding those.
0 Kudos
SimonMorgan
Frequent Contributor
Simon,

   It is not a bug, it seems that it is a feature that was added as in the code they are calling createFeatureLayersFromDynamicMapService for all DynamicMapServices to see if there is a corresponding FeatureService and if there is present that as an editable layer. So yes it seems you have to do the extra steps of excluding those.


Thank you for clarifying. I did not notice this listed in the waht's documentation. Luckily I have only just started making sure all my apps work with 2.5 so I may rethink how I have some of them configured.
0 Kudos
SheriNorton
Frequent Contributor
I have the same problem - only a brief set of layers (3) were in my Edit list for version 2.4, but now I have all the dynamic layers listed despite explicit exclude statements in the XML. I'm stumped.
0 Kudos
ChristopherOlsen
Frequent Contributor
I can reproduce the issue that Sheri mentioned.  If I have feature access enabled, but the service is set as dynamic in the XML, it will allow me to edit the service anyway.  I have logged a bug under: #NIM077296  Dynamic layers can be edited in Flex 2.5 if feature access is enabled on the service.

As an FYI, this seems to only be effecting version 2.5...  In testing with 2.4, it works properly.

Thanks,
Chris
0 Kudos