Select to view content in your preferred language

Edit widget and feature service layer syntax

2153
6
Jump to solution
03-22-2012 01:01 PM
JoshuaGumm
Deactivated User
I am using the Flex Viewer version 2.5 to create an editing application using a feature service. In the past and from what I have seen posted, I used the following syntax in the operational layers tag, with the Address Points layer being the only one in the service (0):

<layer label="Address Points" type="feature" visible="true" alpha="1.0" url="http://website/ArcGIS/rest/services/EditingService/FeatureServer/0"/>

But when firing up the application, the Edit Widget just says "Select template to create feature", then will change to "No editable layers".  The layer is listed in the operational layers TOC and can be turned on and off.  Interestingly enough though, if I add "MapServer/" to the URL parameter (url="http://website/ArcGIS/rest/services/EditingService/MapServer/FeatureServer/0"/>), then the edit widget recognizes the feature service & template and editing works fine. Problem is though, using this REST URL syntax gives me another error every time the application initially loads.

The error states the map manager layer failed to load, fault code 400, invalid URL. If you close out the error the application works fine for the rest of session and editing works as expected.

Anyone have any ideas? I appreciate the help.

Thanks,
Josh
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Josh,

   So are you saying that you tried this:

<layer label="Address Points" type="feature" visible="true"  alpha="1.0"  url="http://website/ArcGIS/rest/services/EditingService/MapServer/0"/>

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Josh,

   So in ArcMap when you start editing this particular layer do you actually have a editing template establish for that layer?
0 Kudos
JoshuaGumm
Deactivated User
Yes, when editing in ArcMap there is a template configured for the layer.  The template is recognized and works in the Flex Viewer application when I have "/MapServer" in the URL parameter, but then I get the map manager layer failed to load, fault code 400, invalid URL error.  You can close the error message and the application works fine, with editing capabilities, etc.  All examples I have found don't have the "/MapServer" in the URL, but if I remove it, then it doesn't recognize the template and does not allow editing.  It's weird and I'm not quite sure what else to try.

I appreciate any insight you can provide.

Thanks Robert,
Josh
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Josh,

   So are you saying that you tried this:

<layer label="Address Points" type="feature" visible="true"  alpha="1.0"  url="http://website/ArcGIS/rest/services/EditingService/MapServer/0"/>
0 Kudos
MichaelMiller2
Frequent Contributor
Josh,

Try using  "FeatureServer" instead of "MapServer" in your config file.  You will also need to check "Feature Access" under Capabilities tab when you publish the service.  You should be able to use those layers to edit in your app.

Michael
0 Kudos
JoshuaGumm
Deactivated User
Robert,
  I had not tried it w/o "FeatureServer" and only having "MapServer" in the URL, but it is working now.  In the past I had used "FeatureServer" and it had worked fine.  Either way, I think I'm good and I really appreciate the help.

Thanks,
Josh
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

Glad you got it working. Don't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:

0 Kudos