Declare "esri\layer\ FeatureLayer" js api to print.js

2271
10
04-08-2016 07:03 AM
hishamshrideh2
New Contributor II

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 .

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

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.

FlorianCADOZ
Occasional Contributor

@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 !

RobertScheitlin__GISP
MVP Esteemed Contributor

Florian,

Since when do backslashes work in a JS require?

KenBuja
MVP Honored Contributor

Those are showing correctly in the print.js screen shot.

FlorianCADOZ
Occasional Contributor

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

RobertScheitlin__GISP
MVP Esteemed Contributor

OK I did not see the screenshot .

FlorianCADOZ
Occasional Contributor

No problem =)

hishamshrideh2
New Contributor II

Hi , I want to edit feature layer in print function , what the order of define function ? , may be  this is the wrong

0 Kudos
FlorianCADOZ
Occasional Contributor

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 !)

0 Kudos