Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

So i post my question here because it didnt recieved any answers on Stackoverflow.

Hello i have some difficulties, Let me see what i want to do with some pictures and code:

I want to add some features with the edit widgets, when i do i get this:

enter image description here

But i need to get: add attachment under 'oprmerking',

When i click on the one i just added, i get to see the add attachment button, but i need to add the attachment when i create the new object: This is a picture of it:

enter image description here

There you see the show attachment, and there you can, if there is no attachment, add an attachment.

Also, when i sometimes press one of the functions, or another widget, and i click on the little green thing and only this shows: this is weird right?

enter image description here

Anyways, maybe you know what i'm doing wrong, here's some of my code from the

private function createFieldInspectors(editableLayerName:String,




 editor.attributeInspector.formFieldsOrder =

 var layer:Layer;
 var fLayer:FeatureLayer;
 layer = map.getLayer(editableLayerName);

 //if layer is null, you entered the wrong name in the layername tag of the specific   editablelayer
 if(!layer) return;
 fLayer = layer

 as FeatureLayer;
 var field:FieldInspector;
 var fieldHidden:FieldInspector;
 // Setup FieldInspectors for visible fields
 // Assumption: both editableLayerFieldNames and editableLayerFieldLabels will have the  same number of elements
 for (var i:Number = 0; i < editableLayerFieldNames.length; i++)

 field =

 new FieldInspector();
 field.featureLayer = fLayer;

 field.fieldName = editableLayerFieldNames[i];

 field.label = editableLayerFieldLabels[i];



// Setup FieldInspectors for hidden fields
for (var j:Number = 0; j < editableLayerHiddenFields.length; j++)

fieldHidden =

new FieldInspector();
fieldHidden.featureLayer = fLayer;

fieldHidden.fieldName = editableLayerHiddenFields[j];

fieldHidden.visible =




var editablelayers:XMLList = configXML.editablelayers as XMLList;
var editableLayerFieldNames:Array;
var editableLayerFieldLabels:Array;
var editableLayerHiddenFields:Array;
for each(var eLayer:XML in editablelayers.children())

if (eLayer.fieldnames.length() > 0)

// add field names to array
editableLayerFieldNames = [];

const tempFieldArray:Array = eLayer.fieldnames.split(",");
for (var count1:Number = 0; count1 < tempFieldArray.length; count1++)




if (eLayer.fieldlabels.length() > 0)

 // add field labels to array
editableLayerFieldLabels = [];

 const tempLabelArray:Array = eLayer.fieldlabels.split(",");
for (var counter2:Number = 0; counter2 < tempLabelArray.length; counter2++)




if (eLayer.fieldlabels.length() > 0)

// add names of hidden fields to array
editableLayerHiddenFields = [];

const tempHiddenFieldArray:Array = eLayer.hiddenfields.split(",");
for (var count3:Number = 0; count3 < tempHiddenFieldArray.length; count3++)







 map.addEventListener(MapEvent.LAYER_ADD, mapLayerAddHandler,

 map.addEventListener(MapEvent.LAYER_REMOVE, mapLayerRemoveHandler,

 map.addEventListener(MapEvent.LAYER_REORDER, mapLayerReorderHandler,

 map.infoWindow.addEventListener(Event.CLOSE, infoWindowCloseHandler);


 null, getOplayers);
 mapLayers = map.layers

 as ArrayCollection;
 arrLayers = getLayers(mapLayers);

 // get all the layers on map except basemap layers;


And here's my xml:

<?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. -->

    <fieldlabels>Datum Opname,Afstand Tot Hart  Spoor,Kilometer,Diameter,Type,Toestand,Status,Opmerking</fieldlabels>
    <fieldlabels>Waterschap,Jaar,Gemeente,Eigenaar,Gereed,Datum Gereed,Opmerking</fieldlabels>
    <!-- dit was in de comments tot showeditdatefield -->


I Fixed the problem when the popup didnt had any attributes that was because of the property, the problem i need to fix is with the add attachment when i add all the attributes, or maybe an option to hide the layers, because when i turn off the excludelayer i get to see all the layers. Any help would be appreciated

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.