Select to view content in your preferred language

Edited features disappear

5160
15
04-26-2011 05:07 AM
CurtWalker
Deactivated User
I have added the Editor component to a simple map service with 7 line layers added as Feature Layers.  A Geometry Service is running and referenced in my mxml.  Upon loading the map service in Firefox I can select which layer I want to edit and digitize new lines....but the new lines always disappear when I double-click to complete the new feature.  What could be causing this?
Tags (2)
0 Kudos
15 Replies
CurtWalker
Deactivated User
Forgot to mention that Feature Access is exposed under this service.  I've also tried it in multiple browsers.  The Geometry Service seems to be okay as well.

Thus far every single feature I have digitized simply vanishes afterward.
0 Kudos
MehulChoksey
Esri Contributor
One of the reason for Feature not showing in feature layer is that features are scale dependant. Chances are that the scale at which you are trying to edit is outside of scale range.
What is the min and max scale defined for the feature layer that you are trying to edit?
Min and Max scale can be seen in the REST services directory
e.g.  In services Directory look for min and max scale
http://<your server>/ArcGIS/rest/services/<your service>/FeatureServer/0



Mehul
0 Kudos
CurtWalker
Deactivated User
Mehul,

Thank you for your help.  Here is what I have set in the Feature layers:

Min. Scale: 0

Max. Scale: 0

Extent:

      XMin: -95.8503078769999
      YMin: 29.1512618770001
      XMax: -95.2172382039999
      YMax: 29.551801288
      Spatial Reference: 4326

Where do I make changes to the Min and Max scales?  Is this done in the MXD before I publish as a service?
0 Kudos
CaseyBentz
Frequent Contributor
It doesn't look like the scale is the issue for you.  Can you post your code?  I have a feeling this issue is related to the mode you are using in the feature layer.  For my feature layer, I am using snapshot. 

An other idea is, are the features actually being created, are the new features visible the next time you open the application?

modeproperty
mode:String


Query mode for a feature layer. See the MODE_* constants for possible values. The default mode is to query on demand as the extent, time and layer definition changes. The snapshot mode will make one up-front request for all the features. The onDemand mode - MODE_ON_DEMAND - features are fetched from the server as they are needed.
The snapshot mode - MODE_SNAPSHOT - features are fetched from the server based on DefinitionExpression and/or TimeDefinition. When either definition change, the layer updates itself by querying features back from the server. Once the features are fetched to the client, their "visibility" on the map is based on the time and spatial extents of the map. So for example, for a time animation, you can request all features from server, then adjust time extent on Map to only show some of them.
The selection mode - MODE_SELECTION - only selected features are available on the client side. Usually used in combination with an underlying map service showing the features that can be selected.

The default value is MODE_ON_DEMAND.
0 Kudos
CurtWalker
Deactivated User
Casey, thanks for your help.  My mxml is pasted below.  And you were right the scale limits do not seem to be the problem.  For the sake of experimentation I changed the minScale to 3,000,000 on just one of the layers.  It responded accordingly in the browser but I still cannot get any edits to stick.  When I digitize a line and double-click to complete it there is a little message the appears briefly in the lower-rgiht-hand corner saying 'Add feature failed'.

My code:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
initialize="application_initializeHandler(event)"
pageTitle="Greenlake Pipeline Editor"
>

<s:layout>
  <s:HorizontalLayout/>
</s:layout>

<fx:Style>
  @namespace s "library://ns.adobe.com/flex/spark";
  @namespace mx "library://ns.adobe.com/flex/mx";
  @namespace esri "http://www.esri.com/2008/ags";
 
  esri|InfoWindow
  {
   background-color : #FFFFFF;
   border-thickness : 2;
  }
</fx:Style>


<fx:Script>
  <![CDATA[
   import mx.events.FlexEvent;
  
   protected function application_initializeHandler(event:FlexEvent):void
   {
    myEditor.featureLayers = [ Brazoria, Chambers, Galveston, HarrisExxon, JacksonExxon, MatagordaExxon, VictoriaExxon ];
   }
  ]]>
</fx:Script>

<fx:Declarations>
  <esri:GeometryService id="myGeometryService" url="http://map.entrix.com/ArcGIS/rest/services/Geometry/GeometryServer"/>
</fx:Declarations>


<esri:Map id="myMap">
  <esri:extent>
   <esri:Extent xmin="-10801028" ymin="3315586" xmax="-10506213" ymax="3500325">
    <esri:SpatialReference wkid="102100"/>
   </esri:Extent>
  </esri:extent>
  <esri:ArcGISTiledMapServiceLayer
   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
  <esri:FeatureLayer
   id="Brazoria"
   outFields="*"
   mode="snapshot"
   minScale="3000000"
   maxScale="0"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/0"/>
  <esri:FeatureLayer
   id="Chambers"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/1"/>
  <esri:FeatureLayer
   id="Galveston"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/2"/>
  <esri:FeatureLayer
   id="HarrisExxon"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/3"/>
  <esri:FeatureLayer
   id="JacksonExxon"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/4"/>
  <esri:FeatureLayer
   id="MatagordaExxon"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/5"/>
  <esri:FeatureLayer
   id="VictoriaExxon"
   outFields="*"
   mode="snapshot"
   url="http://map.entrix.com/ArcGIS/rest/services/GeoPoint/GreenlakePipeline/FeatureServer/6"/>
 
</esri:Map>

<esri:Editor id="myEditor"
     geometryService="{myGeometryService}"
     map="{myMap}"
     toolbarVisible="false"
     height="100%"
     width="220"/>

</s:Application>
0 Kudos
CaseyBentz
Frequent Contributor
The line 'Add feature failed' leads me to believe that this is permissions error or something similar. 

Here at my company, we use a third party extension called ArcFM/Miner & Miner/Telvent.  When a feature class is enabled as a ArcFM feature class, it requires an ArcFM Solution license to edit it.  For web editing, a product called ArcFM Server is required.  We do not have this and I get this same 'Add feature failed' message when I attempt to create one of those features.  If you have some sort of third party extentsion, this might be the cause.
0 Kudos
CurtWalker
Deactivated User
We are not running any 3rd-party add-ons that I'm aware of.

On permissions, what I have done is grant read/write privileges to the ags_soc account on the Feature Dataset that contains all seven Feature Layers in my service.  But for some reason I cannot Register as versioned the Feature Dataset.  When I try to do so I get the following error:

Failed to register as versioned.
Lock request conflicts with an established lock[Lock request conflicts with an
established lock[
DATA
DATA]]

I have a contact in ESRI Professional Services who advised that it would need to be registered as versioned in addition to the ags_soc account having read/write privileges.  So I'm 1 for 1 on those two items.  Any ideas on the registration error?
0 Kudos
CaseyBentz
Frequent Contributor
To register a feature class as versioned you will need to get a schema lick, meaning you will need to work with your SDE admin to get a time when all users are off the system.
0 Kudos
CurtWalker
Deactivated User
I've succeeded in registering the feature dataset as versioned (stopped the map service and then it worked).  I still am getting the 'add feature failed' message whenever I try to edit the layers.  Any other ideas?
0 Kudos