I want to declare & define the "esri\layers\FeatureLayer" api to "print .js" file in print widget , when i declare the FeatureLayer api , the widget obtain blank in runtime , please can help me to declare & define it without errors .
Hisham,
First the slashes are reversed you have "esri\layers\FeatureLayer" and it should be "esri/layers/FeatureLayer". It would help to show your code also.
@Robert : no, in his code, the slashes are goods.
@Hisham : can you tell us why you want to do that and show us the console ? Maybe wrong order in the define/function !
Florian,
Since when do backslashes work in a JS require?
Those are showing correctly in the print.js screen shot.
Oh it never worked but if you look in the print_js.png attached you can see that there are only slash and not backslash
Hi , I want to edit feature layer in print function , what the order of define function ? , may be this is the wrong
Woh ! Ok, I thougth you were talking about an other issue of the print widget ...
First step, create another widget (something like CustomPrint) but don't touch the print one !
Second step...I can't help you there 'cause I don't know your code and your workflow, but good luck !
(but your define, seems to be good !)
Is this what you are looking for (lines 29 and 69)?
define([ 'dojo/_base/declare', 'dijit/_WidgetBase', 'dijit/_TemplatedMixin', 'dijit/_WidgetsInTemplateMixin', 'esri/tasks/PrintTask', "esri/tasks/PrintParameters", "esri/tasks/PrintTemplate", "esri/request", 'esri/lang', 'dojo/_base/lang', 'dojo/_base/array', 'dojo/_base/html', 'dojo/dom-style', 'dojo/dom-construct', 'dojo/dom-class', 'dojo/promise/all', 'dojo/Deferred', 'jimu/portalUrlUtils', 'dojo/text!./templates/Print.html', 'dojo/text!./templates/PrintResult.html', 'dojo/aspect', 'dojo/query', 'jimu/LayerInfos/LayerInfos', 'jimu/dijit/LoadingShelter', 'jimu/dijit/Message', 'jimu/utils', 'dijit/form/ValidationTextBox', 'esri/layers/FeatureLayer', 'dijit/form/Form', 'dijit/form/Select', 'dijit/form/NumberTextBox', 'dijit/form/Button', 'dijit/form/CheckBox', 'dijit/ProgressBar', 'dijit/form/DropDownButton', 'dijit/TooltipDialog', 'dijit/form/RadioButton', 'esri/IdentityManager', 'dojo/store/Memory' ], function( declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, PrintTask, PrintParameters, PrintTemplate, esriRequest, esriLang, lang, array, html, domStyle, domConstruct, domClass, all, Deferred, portalUrlUtils, printTemplate, printResultTemplate, aspect, query, LayerInfos, LoadingShelter, Message, utils, ValidationTextBox, FeatureLayer) {
If not then as we mentioned earlier you need to give more description of your issue and code.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle kostenlos ein Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.