Select to view content in your preferred language

Why don't my attributes display when using editor widget from API 3.21?

741
3
Jump to solution
07-27-2017 09:39 AM
ChrisSeabrooke
Deactivated User

I'm new to JavaScript and the API. I'm trying to modify the default editing widget:

Default editing widget | ArcGIS API for JavaScript 3.21 

When I change the URL to my feature service, only one field  displays in the form. I tried different features from my service and still only one field displays. The field that displays is the  ‘Type ID Field’  in the layer. A snippet from my code:

var operationsPointLayer = new FeatureLayer("http://50.18.50.62:6080/arcgis/rest/services/FieldSeekerMobile3/FeatureServer/15", {
mode: FeatureLayer.MODE_ONDEMAND,
outfields: ["*"]
});

map.addLayers([operationsPointLayer]);
map.infoWindow.resize(400, 300);

function initEditing(event) {
var featureLayerInfos = arrayUtils.map(event.layers, function (layer) {
return { "featureLayer": layer.layer };
});

var settings = {
map: map,
layerInfos: featureLayerInfos
};
var params = {
settings: settings
};
var editorWidget = new Editor(params, 'editorDiv');
editorWidget.startup();

//snapping defaults to Cmd key in Mac & Ctrl key in PC
// specify 'snapKay' option only if you want a different key combination
// for snapping
map.enableSnapping();
}

Any suggestions will be appreciated.

0 Kudos
1 Solution

Accepted Solutions
ChrisSeabrooke1
Occasional Contributor

Determined what I was doing wrong - I had 

outfields: ["*"]

Needs to be 

outFields -- capitalization error. 

View solution in original post

0 Kudos
3 Replies
SarojThapa1
Frequent Contributor

Chris,

Change http to https in your 

var operationsPointLayer = new FeatureLayer("https://")

0 Kudos
ChrisSeabrooke
Deactivated User

Saroj,

Now the layer doesn’t display in the map. In the console I have this message:

Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR

15 Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR

Error: Unable to draw graphic (geometry:null, symbol:null): Error loading https://50.18.50.62:6080/arcgis/rest/services/FieldSeekerMobile3/FeatureServer/15?f=json&callback=do...

0 Kudos
ChrisSeabrooke1
Occasional Contributor

Determined what I was doing wrong - I had 

outfields: ["*"]

Needs to be 

outFields -- capitalization error. 

0 Kudos