Select to view content in your preferred language

Featurelayers not visible in 3.6 Viewer

782
8
Jump to solution
02-26-2014 05:17 PM
NeoGeo
by
Frequent Contributor
I am working on migrating from AGS10.0 with a 2.5 Flex Viewer to AGS 10.2 with a 3.6 Flex viewer.  When I recreated my services that were to be used in the edit widget, I enabled feature access as usual and pretty much copy and pasted the entry from my 2.5 viewer config.xml as the service names are still the same.  It may just be something stupid because I am tired, but the Featureserver layers do not show up in the 3.6 viewer.  The featureserver layers can be previewed in ArcCatalog though.  Obviously the edit widget does not work either without the feature layers.  The mapserver layer with the same name is visible in the Flex viewer, just not the featureserver portion.  According to the edit widget documentation, it should be compatible with ArcSDE 10.0.  Is that incorrect? 

Thank you
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NeoGeo
by
Frequent Contributor
I gave both of you guys some points because both were helpful.  It turned out not to be a Flex Viewer problem after all.  After more testing, I realized that the layers were having problems in ArcGIS Desktop 10.2.1, not just server ( but not in 10.0 or 10.1).  Identify would fail and selection would give "Underlying DBMS error.  SQL Server Native Client 10.0 Numeric Value out of range".  The machine had the SQL Server 2008 Client version 10.0.1600.22 which I thought was the most current, but according to another thread concerning this error, they said that you had to use the SQL client out of the SQL Server Feature Pack 3 and that did indeed fix the problem.  Thank you guys for helping with the tags and explaining the tip in the ESRI docs which I had read 5 or 6 times but was still clear as mud until you explained better.

View solution in original post

0 Kudos
8 Replies
AnthonyGiles
Honored Contributor
NeoGeo

How are you adding your layers in the config.xml, are you adding individual feature layers or a single dynamic map seervice, the edit widget should pick up a dynamic map service that has feature access enabled. From the help:

'When the Edit widget is opened, it checks if the operational layer(s) contain dynamic map services. If there are dynamic services, and there are no other matching editable feature layers associated with that service (such as in a feature service), the Edit widget will add those matching feature layers in the widget. The individual feature layers and their template(s) are not shown outside of the Edit widget since these layers are added only for editing'

Have you also tried clearing the browser cache and closing / reopening the browser?

Are your services publically available to look at or can you post up your main config.xml and your edit widget xml

Regards

Anthony
0 Kudos
NeoGeo
by
Frequent Contributor
It is good to know that in the new viewer Feature services don't display at all outside of an edit widget, but mine don't display in the edit widget either.  I upgraded our sde database to 10.2.1 today to eliminate that as a possible problem so we can't blame it on the sde version. 

An example config.xml entry looks like this (note that I also tried removing the MapServer layer to no effect):
     <layer label="SAR Grid" type="dynamic" visible="false"
                   url="http://a0-em-agx.ds.army.mil/ArcGIS/rest/services/Aviation_30min_SAR_Grid/MapServer">
                <sublayer id="0" popupconfig="popups/PopUp_Aviation_30min_SAR_Grid.xml"/> 
     </layer>
        <layer label="SAR Grid Edits" type="feature" visible="false" alpha="0.5"
                   popupconfig="popups/PopUp_Aviation_30min_SAR_Grid.xml"
   url="http://a0-em-agx.ds.army.mil/ArcGIS/rest/services/Aviation_30min_SAR_Grid/FeatureServer/0"/>


EditWidget.xml looks like this (with the other layers removed):
<?xml version="1.0" ?>
<!-- If compiling this widget, make sure to add -keep-all-type-selectors=true to your compiler arguments in the FB project properties. --> <configuration label="Edit (example)">
    <createoptions>
        <polygondrawtools>polygon,freehandpolygon,extent,autocomplete</polygondrawtools>
        <polylinedrawtools>polyline,freehandpolyline,line</polylinedrawtools>
    </createoptions>
    <addfeatures>false</addfeatures>
    <deletefeatures>false</deletefeatures>
    <toolbarvisible>false</toolbarvisible>
    <toolbarcutvisible>false</toolbarcutvisible>
    <toolbarmergevisible>false</toolbarmergevisible>
    <toolbarreshapevisible>false</toolbarreshapevisible>
    <updategeometry>false</updategeometry>
    <updateattributes>true</updateattributes>
    <excludelayer>HSIP Chemicals</excludelayer>
    <editablelayers>
        <editablelayer>
  <layername>SAR Grid Edits</layername>
  <fieldnames>NAME,SAR_Status,AVN_SAR_ID</fieldnames>
    <fieldlabels>Name,SAR_Status,AVN_SAR_ID</fieldlabels>
    <hiddenfields>LAT,LON</hiddenfields>
        </editablelayer>
    </editablelayers>
</configuration>


I should add that I do not allow geometry editing on any layers as they quickly get ruined.  Users just need to be able to click on a feature in the map and edit the attributes.
0 Kudos
AnthonyGiles
Honored Contributor
NeoGeo,

I am not sure about your <editablelayers> tags you have in your edit widget xml! there is no mention of these tags in the help:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Edit_widget_tags/01m30000000v00...

You may want to check them

Regards

Anthony
0 Kudos
NeoGeo
by
Frequent Contributor
That is a good catch.  I know I looked at that tag reference but did not notice that change.  Unfortunately the featureserver edit layers still do not show up.  Interestingly the popups do not work on the mapserver layer either.  It has to be something basic they changed in 10.2/3.6 but I just have not figured out what.  I looked through the documentation again, but did not see anything.

This is what editwidget.xml looks like now:
<?xml version="1.0" ?>
<!-- If compiling this widget, make sure to add -keep-all-type-selectors=true to your compiler arguments in the FB project properties. --> <configuration label="Edit (example)">
    <createoptions>
        <polygondrawtools>polygon,freehandpolygon,extent,autocomplete</polygondrawtools>
        <polylinedrawtools>polyline,freehandpolyline,line</polylinedrawtools>
    </createoptions>
    <addfeatures>false</addfeatures>
    <deletefeatures>false</deletefeatures>
    <toolbarvisible>true</toolbarvisible>
    <toolbarcutvisible>false</toolbarcutvisible>
    <toolbarmergevisible>false</toolbarmergevisible>
    <toolbarreshapevisible>false</toolbarreshapevisible>
    <updategeometry>false</updategeometry>
    <updateattributes>true</updateattributes>
       
   <layersettings>
       <layer name="SAR Grid Edits"> <!-- feature layer -->
          <fields>
             <field name="NAME" alias="NAME"/>
             <field name="SAR_Status" alias="SAR_Status"/>
             <field name="AVN_SAR_ID" alias="AVN_SAR_ID"/>
          </fields>    
          <showobjectid>false</showobjectid>
          <showglobalid>false</showglobalid>
          <singletomultilinethreshold>60</singletomultilinethreshold>         
          <formfieldsorder>fields</formfieldsorder>            
      </layer>
    </layersettings>   
    <excludelayer>HSIP Emergency Services Locations</excludelayer>
</configuration>


Also I have not found anything in the documentation covering it, but it appears you can edit without using featureserver layers now?  Why even have the featureserver layers then?
0 Kudos
BjornSvensson
Esri Regular Contributor
It has to be something basic they changed in 10.2/3.6

If so, it's most likely something that changed between 2.5 and 3.0 of the Viewer, than anything on the ArcGIS Server side.  At least that's my guess.

Also I have not found anything in the documentation covering it, but it appears you can edit without using featureserver layers now? Why even have the featureserver layers then?


Correct, you don't have to add the featurelayers to the operational layers. The way this works is that it looks at the "dynamic" services and checks if there are matching editable "FeatureServices" for those map services. It's documented but maybe not as clear as it could be.  Here's the snippet from the viewer documentation:

...it checks if the operational layer(s) contain dynamic map services. If there are dynamic services, and there are no other matching editable feature layers associated with that service (such as in a feature service), the Edit widget will add those matching feature layers in the widget.


This is documented in the "Tip" at the bottom of the Edit widget documentation - http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Edit_widget/01m30000003v000000/. So on the server the FeatureService is still needed, but you don't have specify each layer in your viewer config file.
0 Kudos
NeoGeo
by
Frequent Contributor
I changed the config.xml and the editwidget.xml to do it the new way where the featureserver layer is not listed in the config.xml (which does seem like it would be less confusing for users) and changed the editwidget.xml accordingly per the edit widget tags documentation.  The layers I have in the editwidget.xml are indeed listed in the editwidget.xml when the widget starts, but they are not visible.  While you can turn on the mapserver layer version of it from the layerlist (outside the edit widget), you cannot select anything to edit it.  I am starting to wonder if the 3.6 version is just plain broken and the functionality was stripped out to add in the ability to use templates.  My new editwidget.xml looks like this:
<?xml version="1.0" ?>
<!-- If compiling this widget, make sure to add -keep-all-type-selectors=true to your compiler arguments in the FB project properties. --> <configuration label="Edit (example)">
    <createoptions>
        <polygondrawtools>polygon,freehandpolygon,extent,autocomplete</polygondrawtools>
        <polylinedrawtools>polyline,freehandpolyline,line</polylinedrawtools>
    </createoptions>
    <addfeatures>false</addfeatures>
    <deletefeatures>false</deletefeatures>
    <toolbarvisible>true</toolbarvisible>
    <toolbarcutvisible>false</toolbarcutvisible>
    <toolbarmergevisible>false</toolbarmergevisible>
    <toolbarreshapevisible>false</toolbarreshapevisible>
    <updategeometry>false</updategeometry>
    <updateattributes>true</updateattributes>
       
    <layersettings>
       <layer name="POD Edits"> <!-- mapserver layer -->
           <sublayer id="0" iseditable="true">
           <fields>
              <field name="POD_Status" alias="POD_Status"/>
              <field name="POD_ID" alias="POD_ID"/>
              <field name="POD_Name" alias="POD_Name"/>
              <field name="Parish" alias="Parish"/>
              <field name="Address" alias="Address"/>
              <field name="City" alias="City"/>
              <field name="Type" alias="Type"/>
              <field name="Zip" alias="Zip"/>
              <field name="Link" alias="Link"/>
              <field name="Manager" alias="Manager"/>
              <field name="Phone" alias="Phone"/>
              <field name="Priority" alias="Priority"/>
              <field name="Meals_on_H" alias="Meals_on_H"/>
              <field name="Water_on_H" alias="Water_on_H"/>
              <field name="Tarps_on_H" alias="Tarps_on_H"/>
           </fields>    
           <showobjectid>false</showobjectid>
           <showglobalid>false</showglobalid>
           <singletomultilinethreshold>60</singletomultilinethreshold>         
           <formfieldsorder>fields</formfieldsorder>
          </sublayer>            
      </layer>
       <layer name="SAR Grid Edits"> <!-- feature layer -->
        <sublayer id="0" iseditable="true">
           <fields>
              <field name="NAME" alias="NAME"/>
              <field name="SAR_Status" alias="SAR_Status"/>
              <field name="AVN_SAR_ID" alias="AVN_SAR_ID"/>
           </fields>    
           <showobjectid>false</showobjectid>
           <showglobalid>false</showglobalid>
           <singletomultilinethreshold>60</singletomultilinethreshold>         
           <formfieldsorder>fields</formfieldsorder>
          </sublayer>            
      </layer>
    </layersettings>   
    <excludelayer>HSIP Emergency Services Locations</excludelayer>
</configuration>
0 Kudos
BjornSvensson
Esri Regular Contributor
The layers I have in the editwidget.xml are indeed listed in the editwidget.xml when the widget starts, but they are not visible.  While you can turn on the mapserver layer version of it from the layerlist (outside the edit widget), you cannot select anything to edit it.  I am starting to wonder if the 3.6 version is just plain broken and the functionality was stripped out to add in the ability to use templates.


It can be hard to help without having access to the service. Assuming that you can't make it, or a copy, public, you might want to contact Esri Technical Support to have them help work though your setup.

If you don't want to do that, here's a few things to try:

  • Use the application builder to set up a simple app using this mapservce. Start with a basic setup before adding all the finetuning options.

  • I didn't understand the part about "listed...but not visible".  Are they not visible on the map, or not in the Edit widget? When you application starts, does the layers you want to edit show in the TOC (or layerlist widget)?  Are they turned on or not? Are there any scale dependency or other things that might impact its visibility?

  • If you look at the network traffic is there anything that's "red" or failing?

  • If you turn on some of the options you've set to false, does it work then?  For example:<addfeatures>false</addfeatures>, <deletefeatures>false</deletefeatures>, <updategeometry>false</updategeometry>.

  • If you have popupconfigs defined for the problem service, try removing that from the main config to see if that might be causing an issue for you.

0 Kudos
NeoGeo
by
Frequent Contributor
I gave both of you guys some points because both were helpful.  It turned out not to be a Flex Viewer problem after all.  After more testing, I realized that the layers were having problems in ArcGIS Desktop 10.2.1, not just server ( but not in 10.0 or 10.1).  Identify would fail and selection would give "Underlying DBMS error.  SQL Server Native Client 10.0 Numeric Value out of range".  The machine had the SQL Server 2008 Client version 10.0.1600.22 which I thought was the most current, but according to another thread concerning this error, they said that you had to use the SQL client out of the SQL Server Feature Pack 3 and that did indeed fix the problem.  Thank you guys for helping with the tags and explaining the tip in the ESRI docs which I had read 5 or 6 times but was still clear as mud until you explained better.
0 Kudos