Uncaught TypeError: Cannot read property 'decimalFormat' of undefined Editor.js:522
code below:
require([
"dojo/parser",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"esri/map",
"esri/toolbars/edit", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/FeatureLayer", "esri/Color",
"esri/config",
"esri/tasks/GeometryService",
"esri/urlUtils",
"esri/arcgis/utils",
"dojo/dom",
"dojo/_base/array",
"dijit/Toolbar", "esri/dijit/Popup", "dojox/layout/FloatingPane", "dojox/layout/ExpandoPane", "esri/toolbars/navigation", "esri/dijit/Print", "esri/tasks/PrintTemplate", "dojo/request/xhr", "dijit/form/ComboBox", "dijit/form/Button", "esri/dijit/editing/Editor", "esri/dijit/editing/TemplatePicker", "dojo/i18n!esri/nls/jsapi", "dojo/keys",
"dojo/domReady!"
], function (parser, BorderContainer, ContentPane, Map, Edit, ArcGISTiledMapServiceLayer, ArcGISDynamicMapServiceLayer, FeatureLayer,Color, config, GeometryService, urlUtils, arcgisUtils, dom, array, Toolbar, Popup, FloatingPane, ExpandoPane, Navigation, Print, PrintTemplate, xhr, ComboBox, Button, Editor,TemplatePicker,jsapiBundle, keys
) {
loading = dojo.byId("loadingImg"); //loading image. id
edtest = Editor;
esri.config.defaults.io.alwaysUseProxy = false;
esri.config.defaults.io.corsEnabledServers.push(app.AppCors_Url);
esri.config.defaults.io.proxyUrl = app.proxy_Url;
//Geometry Service
geometrysvc = new esri.tasks.GeometryService(app.geometryService_Url);
esri.config.defaults.geometryService = geometrysvc;
popup = new esri.dijit.Popup(null, dojo.create("div"));
var sliderPos = "top-right";
if ($("#HdnLanguage").val() == "en-US") {
sliderPos = "top-left";
}
map = new Map("map", {
sliderStyle: "large",
sliderOrientation: "vertical",
sliderPosition: sliderPos
});
app.map = map;
dojo.connect(app.map, "onUpdateStart", showLoading);
dojo.connect(app.map, "onUpdateEnd", hideLoading);
//Map extents change event
dojo.connect(app.map, "onExtentChange", function (extent) {
bExtentChange = true;
previousExtent = extent;
//scale
scale = app.map.getScale();
var ScaleValue = document.getElementById("lstscale");
document.getElementById("lstscale").value = app.map.__LOD.scale;
//Register UserOpen Application
//dojo.byId("mouseCordinates").innerHTML = "<b>Lat : </b>" + pt1.y.toFixed(8) + ", <b>Long : </b>" + pt1.x.toFixed(8) + " / <b>X : </b>" + mp.x.toFixed(3) + ", <b>Y : </b>" + mp.y.toFixed(3) + ", <b> Scale : </b>" + scale;
if (pt1 != undefined) {
// for utm coordinates
var getvar = ToUTM(pt1.y, pt1.x);
var utmy = parseFloat(getvar.split('|')[0]);
var utmx = parseFloat(getvar.split('|')[1]);
var lang1 = $("#HdnLanguage").val();
if (lang1 == "ar-SA") {
dojo.byId("mouseCordinates").innerHTML = "<b>X : </b>" + pt1.x.toFixed(3) + ", <b>Y : </b>" + pt1.y.toFixed(3) + "/ <b> مستوى : </b>" + scale;
}
else {
dojo.byId("mouseCordinates").innerHTML = "<b>X : </b>" + pt1.x.toFixed(3) + ", <b>Y : </b>" + pt1.y.toFixed(3) + " / <b> Scale : </b>" + scale;
}
}
});
app.map.disableClickRecenter();
dojo.connect(app.map, "onLoad", mapReady);
//LandBase Service
app.BaseMapLandBase_Service = new ArcGISTiledMapServiceLayer(app.BaseMapLandBase_Url);
if (app.BaseMapLandBase_Service.loaded) {
SetLabels(app.BaseMapLandBase_Service);
}
else {
dojo.connect(app.BaseMapLandBase_Service, "onLoad", SetLabels);
dojo.connect(app.BaseMapLandBase_Service, "onError", showMapServiceError);
}
app.map.addLayer(app.BaseMapLandBase_Service);
//ElectricGrid Service
app.ElectricGrid_Service = new ArcGISDynamicMapServiceLayer(app.ElectricGrid_Url);
app.PKMapservice_Service = new ArcGISDynamicMapServiceLayer(app.PKMapservice_Url);
app.map.addLayer(app.ElectricGrid_Service);
app.map.addLayer(app.PKMapservice_Service);
customerLocationLayer = new esri.layers.FeatureLayer(app.PKEditingService_Url + "/" + customerlocationlayerid, {
mode: esri.layers.FeatureLayer.MODE_SELECTION,
outFields: ["OBJECTID", "ORDERNO", "DESCRPTION", "CREATED", "DISTRICTNAME", "DISTRICTNO", "AREANO", "MASARNO", "USERCREATED", "X", "Y", "USERID", "LASTMODIFIED"]
});
operationsPolygonLayer = new esri.layers.FeatureLayer(app.PKEditingService_Url + "/" + kashfealayerid, {
mode: esri.layers.FeatureLayer.MODE_SELECTION,
outFields: ["OBJECTID", "REQUISITENO", "CUSTOMERVIP", "CUSTOMERNAME", "ORDERTYPE", "DISTRICT", "DEEDNO", "DEEDDATE", "BLDPERMNO", "BLDPERMDATE", "NEAREST_CUSTOMER", "NEAREST_STATION", "STATUS", "MOBILE"
, "USERCREATED", "CREATED", "USERID", "LASTMODIFIED", "PLANNO", "PLOTNO", "NATIONAL_ID"]
});
navToolbar = new esri.toolbars.Navigation(app.map);
dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);
var EditEvent = dojo.connect(app.map, "onLayersAddResult", initEditingFunc);
//Adding MapServices to Map
app.map.addLayers([operationsPolygonLayer, customerLocationLayer]);
});
function initEditingFunc(){
var editr=new Editor();
}