I can't get any value from featurelayer. This is the code:
function testarvin1() {
require([
"esri/Map",
"esri/layers/FeatureLayer"],
function (FeatureLayer) {
var layerName = $('#ClassifyLayer').val().replace(LAYER_PREFIX, '');
var fl = new esri.layers.FeatureLayer("http://192.168.0.205:6080/arcgis/rest/services/SAMA/MapServer/3", {
id: 3,
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"],
});
console.log("fl is " + fl);
var g = fl.minScale;
var h = fl.name;
console.log("the minscale is = " + g);
console.log("the name is = " + h);
fl.applyEdits();
map.addLayer(fl);
});}
I get "the fl is [object object]", "the minscale is = 0" and "the name is undefined" in console.
What am i doing wrong? I changed the featurelayer mode but didn't help.