-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsapi.js
executable file
·6537 lines (6133 loc) · 536 KB
/
jsapi.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
define(function (require, exports, module) {
"use strict";
esri = function () {
/// <summary>The esri namespace has several utility methods associated with it. These methods are convenience methods that are not associated with any class.</summary>
/// <field name="config" type="Object">ArcGIS JavaScript API default configurations that can be overridden programmatically. For details, see Default API configurations.</field>
/// <field name="config.defaults.io.useCors" type="Boolean">Indicates whether esri/request should make cross-origin HTTP requests where both browser and server support CORS. Default is true. When false, a proxy may be used in some cases if configured.</field>
/// <field name="documentBox" type="Object">Represents the size of the client side window or document at first load. The size contains width and height properties, and these do not change on window resize.</field>
/// <field name="version" type="Number">Current version of the JavaScript API.</field>
};
esri.addProxyRule = function (rule) {
/// <summary>Adds the given proxy rule to the proxy rules list: esri.config.defaults.io.proxyRules</summary>
/// <param name="rule" type="Object" optional="false">The rule argument should have the following properties:proxyUrl - URL for the proxy.urlPrefix - URL prefix for resources that need to be accessed through the given proxy.</param>
/// <return type="Number">Number</return>
};
esri.filter = function (object,callback,thisObject) {
/// <summary>Creates a new object with all properties that pass the test implemented by the filter provided in the function.</summary>
/// <param name="object" type="Object" optional="false">Object to filter.</param>
/// <param name="callback" type="Function" optional="false">Function or string implementing the filtering.</param>
/// <param name="thisObject" type="Object" optional="false">Optional object used to scope the call to the callback.</param>
/// <return type="Object">Object</return>
};
esri.getGeometries = function (graphics) {
/// <summary>Converts an array of graphics to an array of geometries. This is primarily used by GeometryService. Beginning with version 2.0, GeometryService accepts only geometries and not graphics.</summary>
/// <param name="graphics" type="Graphic[]" optional="false">Array of graphics to convert to geometries</param>
/// <return type="Geometry[]">Geometry[]</return>
};
esri.getProxyRule = function () {
/// <summary>Returns the proxy rule that matches the given url.</summary>
/// <return type="Object">Object</return>
};
esri.graphicsExtent = function (graphics) {
/// <summary>Utility function that returns the extent of an array of graphics. If the extent height and width are 0, null is returned.</summary>
/// <param name="graphics" type="Graphic[]" optional="false">The input graphics array.</param>
/// <return type="Extent">Extent</return>
};
esri.hide = function (element) {
/// <summary>Hides an HTML element such as a DIV or TABLE.</summary>
/// <param name="element" type="Element" optional="false">The name of the HTML element.</param>
};
esri.isDefined = function (value) {
/// <summary>Returns true when the value is neither null or undefined. Otherwise false.</summary>
/// <param name="value" type="Object" optional="false">The value to test.</param>
/// <return type="Boolean">Boolean</return>
};
esri.request = function (request,options) {
/// <summary>Retrieve data from a remote server or upload a file from a user's computer.</summary>
/// <param name="request" type="Object" optional="false">request argument is an object with the following properties that describe the request. Property Name Type Description url String Request URL. (required) content Object If the request url points to a web server that requires parameters, specify them here. The default value is null. form Object If the request is to upload a file, specify the form element that contains the file input control here. The default value is null. Starting at version 3.3, the form parameter can be an instance of FormData. Using FormData you can send a "multipart/form-data" request to the server without having to create an HTML form element in markup. Note that the FormData api is not available in all browsers. handleAs String Response format. Valid values are 'json', 'xml', 'text'. The default value is 'json'. callbackParamName String Name of the callback parameter (a special service parameter) to be specified when requesting data in JSONP format. It is ignored for all other data formats. For ArcGIS services the value is always 'callback'. timeout Number Indicates the amount of time to wait for a response from the server. The default is 60000 milliseconds (one minute). Set to 0 to wait indefinitely. </param>
/// <param name="options" type="Object" optional="true">options argument is an object with the following properties representing various options supported by this function. Property Name Type Description usePost Boolean Indicates the request should be made using HTTP POST method. Default is false i.e., determined automatically based on the request size. useProxy Boolean Indicates the request should use the proxy. Default is false i.e., determined automatically based on the domain of the request url disableIdentityLookup Boolean If true, prevents esri.request from triggering user authentication for this request. Default is false i.e., user authentication will be performed if asked by the server. </param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
};
esri.setRequestPreCallback = function (callbackFunction) {
/// <summary>Define a callback function that will be called just before esri.request calls into dojo IO functions such as dojo.rawXhrPost and dojo.io.script.get. It provides developers an opportunity to modify the request.</summary>
/// <param name="callbackFunction" type="Function" optional="false">The callback function that will be executed prior to esri.request calls into dojo IO functions.</param>
};
esri.show = function (element) {
/// <summary>Shows an HTML element such as a DIV or TABLE.</summary>
/// <param name="element" type="Element" optional="false">The name of the HTML element.</param>
};
esri.substitute = function (data,template,first) {
/// <summary>A wrapper around dojo.string.substitute that can also handle wildcard substitution. A wildcard uses the format of ${*}. If no template is provided, it is assumed to be a wildcard. This method is useful if you are not using Graphic or an InfoTemplate, but you want to embed result values in HTML, for example.</summary>
/// <param name="data" type="Object" optional="false">The data object used in the substitution.</param>
/// <param name="template" type="String" optional="true">The template used for the substitution. Can be any valid HTML. If no template is included, the wildcard template is used.</param>
/// <param name="first" type="Boolean" optional="true">When true, returns only the first property found in the data object. The default is false.</param>
/// <return type="String">String</return>
};
esri.toggle = function (element) {
/// <summary>If an HTML element is currently visible, the element is hidden. If the element is hidden, it becomes visible.</summary>
/// <param name="element" type="Element" optional="false">The name of the HTML element.</param>
};
esri.urlToObject = function (url) {
/// <summary>Converts the URL arguments to an object representation. The object format is {path: <String>, query:{key:<Object>}}</summary>
/// <param name="url" type="String" optional="false">The input URL.</param>
/// <return type="Object">Object</return>
};
esri.valueOf = function (array,value) {
/// <summary>Iterates through the argument array and searches for the identifier to which the argument value matches. Returns null if no matching identifier is found.</summary>
/// <param name="array" type="Array" optional="false">The argument array for testing.</param>
/// <param name="value" type="Object" optional="false">The value used in the search. If the value is a String, the value is case sensitive.</param>
/// <return type="Object">Object</return>
};
esri.Credential = function () {
/// <summary>The Credential class represents a credential object used to access a secure ArcGIS resource.</summary>
/// <field name="expires" type="String">Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.</field>
/// <field name="isAdmin" type="Boolean">Indicates whether this credential belongs to a user with admin privileges.</field>
/// <field name="server" type="String">The server url.</field>
/// <field name="ssl" type="Boolean">Indicates whether the resources accessed using this credential should be fetched over HTTPS protocol.</field>
/// <field name="token" type="String">Token generated by the token service using the specified userId and password.</field>
/// <field name="userId" type="String">User associated wth the Credential object.</field>
};
esri.Credential.prototype =
{
destroy: function () {
/// <summary>Destroy a credential. When the credential is destroyed remove any map layers that are using this credential.</summary>
},
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "destroy","token-change"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
refreshToken: function () {
/// <summary>Generate a new token and update the Credential's token property with the newly acquired token. Tokens are typically kept valid using a timer that automatically triggers a refresh before the token expires. Use this method in cases where the timer has been delayed or stopped. </summary>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
toJson: function () {
/// <summary>Return the properties of this object in JSON.</summary>
/// <return type="Object">Object</return>
},
};
esri.Graphic = function (geometry,symbol,attributes,infoTemplate) {
/// <summary>Creates a new Graphic object. Specify parameters in the given order using null if you aren't providing a value for an option. </summary>
/// <param name="geometry" type="Geometry" optional="false">The geometry that defines the graphic.</param>
/// <param name="symbol" type="Symbol" optional="false">Symbol used for drawing the graphic.</param>
/// <param name="attributes" type="Object" optional="false">Name value pairs of fields and field values associated with the graphic.</param>
/// <param name="infoTemplate" type="InfoTemplate" optional="false">The content for display in an InfoWindow.</param>
/// <field name="attributes" type="Object">Name value pairs of fields and field values associated with the graphic.</field>
/// <field name="geometry" type="Geometry">The geometry that defines the graphic.</field>
/// <field name="infoTemplate" type="InfoTemplate">The content for display in an InfoWindow.</field>
/// <field name="symbol" type="Symbol">The symbol for the graphic.</field>
/// <field name="visible" type="Boolean">Indicate the visibility of the graphic. The default value is true.</field>
};
esri.Graphic.prototype =
{
attr: function (name,value) {
/// <summary>Adds a new attribute or changes the value of an existing attribute on the graphic's node. Removes the attribute if the value is null or undefined.</summary>
/// <param name="name" type="String" optional="false">The name of the attribute.</param>
/// <param name="value" type="The attribute's value type" optional="false">The value of the attribute. Set this value as null to remove the attribute.</param>
/// <return type="Graphic">Graphic</return>
},
draw: function () {
/// <summary>Draws the graphic.</summary>
/// <return type="Graphic">Graphic</return>
},
getContent: function () {
/// <summary>Returns the content string based on attributes and infoTemplate values.</summary>
/// <return type="String">String</return>
},
getDojoShape: function () {
/// <summary>Returns the Dojo gfx shape of the ESRI graphic. One common use for the getDojoShape method is to change the drawing order of a graphic using the moveToFront and moveToBack methods.</summary>
/// <return type="dojox.gfx.Shape">dojox.gfx.Shape</return>
},
getInfoTemplate: function () {
/// <summary>Returns the info template associated with the graphic. If no info template is associated with the graphic it returns the info template associated with the parent layer of the graphic. </summary>
/// <return type="InfoTemplate">InfoTemplate</return>
},
getInfoTemplate: function () {
/// <summary>Returns the info template associated with the graphic.</summary>
/// <return type="InfoTemplate">InfoTemplate</return>
},
getLayer: function () {
/// <summary>Returns the graphics layer that contains the graphic. Returns null if the graphic is not added to a layer.</summary>
/// <return type="GraphicsLayer">GraphicsLayer</return>
},
getNode: function () {
/// <summary>Returns the DOM node used to draw the graphic. Returns null or undefined if the graphic is drawn on HTML Canvas.</summary>
/// <return type="SVG Graphics or Group Element | VML Shape or Group Element">SVG Graphics or Group Element | VML Shape or Group Element</return>
},
getTitle: function () {
/// <summary>Returns the title string based on attributes and infoTemplate values.</summary>
/// <return type="String">String</return>
},
hide: function () {
/// <summary>Hides the graphic.</summary>
},
setAttributes: function (attributes) {
/// <summary>Defines the attributes of the graphic.</summary>
/// <param name="attributes" type="Object" optional="false">The name value pairs of fields and field values associated with the graphic.</param>
/// <return type="Graphic">Graphic</return>
},
setGeometry: function (geometry) {
/// <summary>Defines the geometry of the graphic.</summary>
/// <param name="geometry" type="Geometry" optional="false">The geometry that defines the graphic.</param>
/// <return type="Graphic">Graphic</return>
},
setInfoTemplate: function (infoTemplate) {
/// <summary>Defines the InfoTemplate for the InfoWindow of the graphic. When a user clicks a graphic, the InfoWindow opens with this template.</summary>
/// <param name="infoTemplate" type="InfoTemplate" optional="false">The content for display in an InfoWindow.</param>
/// <return type="Graphic">Graphic</return>
},
setSymbol: function (symbol) {
/// <summary>Sets the symbol of the graphic.</summary>
/// <param name="symbol" type="Symbol" optional="false">The symbol for the graphic.</param>
/// <return type="Graphic">Graphic</return>
},
show: function () {
/// <summary>Shows the graphic.</summary>
},
toJson: function () {
/// <summary>Converts object to its ArcGIS Server JSON representation.</summary>
/// <return type="Object">Object</return>
},
};
esri.IdentityManager = function () {
/// <summary>This singleton class is automatically instantiated into esri.id when the module containing this class is imported into the application. This class extends esri.IdentityManagerBase and inherits the base class properties and methods. This class provides the framework and helper methods required to implement a solution for managing user credentials for the following resources: ArcGIS Server resources secured using token-based authentication. Note that only ArcGIS Server versions 10 SP 1 and greater are supported. Secured ArcGIS.com resources (i.e. web maps).If your application accesses services from different domains then it's a cross-domain request and so you need to setup a proxy or use CORS (if supported by browser). If CORS is supported the Identity Manager knows to make a request to the token service over https. Internet Explorer (7-9) do not support CORS so the token request has to go through a proxy hosted on the same-origin as the application (identical protocol, hostname and port). Authentication requests over http are prevented because sensitive data sent via GET can be viewed in server logs. To prevent this the Identity Manager requires that you use POST over https to ensure your credentials are secure. View the 'Using a proxy' and 'CORS' sections in the Inside esri.request help topic for more details. You can access the dialog box used by the IdentityManager using this code: var dialog = dijit.byNode(dojo.query(".esriSignInDialog")[0]);</summary>
/// <field name="dialog" type="dijit.Dialog">Dialog box widget used to challenge the user for their credentials when the application attempts to access a secure resource. This property is available after the onDialogCreate event has fired.</field>
};
esri.IdentityManager.prototype =
{
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "dialog-cancel","dialog-create"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
signIn: function () {
/// <summary>This method is called by the base identity manager implementation.</summary>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
};
esri.IdentityManagerBase = function () {
/// <summary>This class provides the framework and helper methods required to implement a solution for managing user credentials for the following resources: ArcGIS Server resources secured using token-based authentication. Note that only ArcGIS Server versions 10 SP 1 and greater are supported. Secured ArcGIS.com resources (i.e. web maps).This class is not typically used by itself and does not include a user interface to obtain user input. The esri.IdentityManager class provides a complete out-of-the-box implementation.</summary>
/// <field name="tokenValidity" type="Number">The suggested lifetime of the token in minutes. Default is 60 minutes.</field>
};
esri.IdentityManagerBase.prototype =
{
findCredential: function (url,userId) {
/// <summary>Returns the credential for the resource identified by the specified url. Optionally you can provide a userId to find credentials for a specific user.</summary>
/// <param name="url" type="String" optional="false">The url to a server.</param>
/// <param name="userId" type="String" optional="true">The userId for which you want to obtain credentials.</param>
/// <return type="Credential">Credential</return>
},
findServerInfo: function (url) {
/// <summary>Returns information about the server that is hosting the specified url.</summary>
/// <param name="url" type="String" optional="false">The url to a server.</param>
/// <return type="ServerInfo">ServerInfo</return>
},
generateToken: function (serverInfo,userInfo,options) {
/// <summary>Returns an object containing a token and its expiration time. You need to provide the ServerInfo object that contains token service URL and a user info object containing username and password. This is a helper method typically called by sub-classes to generate tokens.</summary>
/// <param name="serverInfo" type="ServerInfo" optional="false">A ServerInfo object that contains a token service URL.</param>
/// <param name="userInfo" type="Object" optional="false">A user info object containing a user name and password.</param>
/// <param name="options" type="Object" optional="true">Optional parameters. (As of 3.0). <Boolean> isAdmin Indicate that the token should be generated using the token service deployed with the ArcGIS Server Admin API. The default value is false. </param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
getCredential: function (url,options) {
/// <summary>Returns a Credential object that can be used to access the secured resource identified by the input url. If required the user will be challenged for a username and password which is used to generate a token. Note: The IdentityManager sets up a timer to update the Credential object with a new token prior to the expiration time. This method is typically called by esri.request when a request fails due to an "invalid credentials" error.</summary>
/// <param name="url" type="String" optional="false">The url for the secure resource.</param>
/// <param name="options" type="Object" optional="true">Optional parameters. (As of 3.0). <Boolean> retry Determines if the method should make additional attempts to get the credentials after a failure. <String> token Token used for a previous unsuccessful attempt to fetch the given url <Error> error Error object returned by the server from a previous attempt to fetch the given url. </param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
initialize: function (json) {
/// <summary>Call this method (during your application initialization) with JSON previously obtained from toJson method to re-hydrate the state of identity manager.</summary>
/// <param name="json" type="Object" optional="false">The JSON obtained from the toJson method.</param>
/// <return type="Object">Object</return>
},
isBusy: function () {
/// <summary>Returns true if the identity manager is busy accepting user input, i.e. the user has invoked signIn and is waiting for a response.</summary>
/// <return type="Boolean">Boolean</return>
},
registerServers: function (serverInfos) {
/// <summary>Register secure servers and the token endpoints.</summary>
/// <param name="serverInfos" type="ServerInfo[]" optional="false">A ServerInfos object that defines the secure service and token endpoint. The Identity Manager makes its best guess to determine the locatation of the secure server and token endpoint so in most cases calling registerServers is not necessary. However if the location of your server or token endpoint is non-standard use this method to register the location.</param>
},
registerToken: function (properties) {
/// <summary>Registers the given OAuth2 access token with the identity manager.An access token can be obtained after the user logs in to ArcGIS Online through your application. This process is described in the User logins via JavaScript apps help topic and demonstrated in this sample application. Once registered with the identity manager, the access token will be passed along with all AJAX requests made by the application (on behalf of the logged in user) to access WebMaps and other items stored in ArcGIS Online.</summary>
/// <param name="properties" type="Object" optional="false">An object with the following properties:<String> serverThis is the root URL for the ArcGIS Online REST APIhttp://www.arcgis.com/sharing/rest<String> tokenThe access token.<String> userIdThe id for the user who owns the access token.<Number> expiresToken expiration time specified as number of milliseconds since 1 January 1970 00:00:00 URC.<Boolean> sslSet this to true if the user has an ArcGIS Online Organizational Account and the organization is configured to allow access to resources only through SSL. </param>
},
setProtocolErrorHandler: function (handlerFunction) {
/// <summary>When accessing secured resources, identity manager may prompt for username and password and send them to the server using a secure connection. Due to browser limitations under certain conditions, it may not be possible to establish a secure connection with the server if the application is being run over HTTP protocol (you can identify the protocol by looking at the URL bar in any browser). In such cases, the Identity Manager will abort the request to fetch the secured resource.</summary>
/// <param name="handlerFunction" type="Function" optional="false">The function to call when the protocol is mismatched.</param>
},
setRedirectionHandler: function (handler) {
/// <summary>When accessing secure resources from ArcGIS.com or one of its sub-domains the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once the user successfully logs-in they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler.</summary>
/// <param name="handler" type="Object" optional="false">An object containing the following redirection properties: <String> resourceUrl The URL of the secure resource that triggers the redirection to the ArcGIS.com sign-in page. <ServerInfo> serverInfo ServerInfo object describing the server where the secure resource is hosted. <String> signInPage URL of the sign-in page where users will be redirected. <String> returnUrlParamName The application URL where the sign-in page redirects after a successful log-in. To create the return URL append the application's URL to signInPage as a parameter. returnUrlParamName contains the name of the parameter. </param>
},
signIn: function (url,serverInfo,options) {
/// <summary>Sub-classes must implement this method to create and manager the user interface that is used to obtain a username and password from the end-user. It should perform the following tasks:Challenge the user for a username and password.Generate a token and return it to the caller via Deferred object. </summary>
/// <param name="url" type="String" optional="false">Url for the secure resource.</param>
/// <param name="serverInfo" type="ServerInfo" optional="false">A ServerInfo object that contains the token service url.</param>
/// <param name="options" type="Object" optional="true">Optional parameters. (As of 3.0). <Error> error Error object returned by the server from a previous attempt to fetch the given url. <Boolean> isAdmin Indicate that the token should be generated using the token service deployed with the ArcGIS Server Admin API. The default value is false. <String> token Token used for previous unsuccessful attempts to fetch the given url </param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
toJson: function () {
/// <summary>Return properties of this object in JSON.It can be stored in a Cookie or persisted in HTML5 LocalStorage and later used to:Initialize the IdentityManager the next time user opens your application.Share the state of identity manager between multiple web pages of your website.This way your users won't be asked to sign in repeatedly when they launch your app multiple times or when navigating between multiple web pages in your website.</summary>
/// <return type="Object">Object</return>
},
};
esri.InfoTemplate = function () {
/// <summary>Creates a new empty InfoTemplate object.</summary>
/// <field name="content" type="String |Function">The template for defining how to format the content used in an InfoWindow.</field>
/// <field name="title" type="String|Function">The template for defining how to format the title used in an InfoWindow.</field>
};
esri.InfoTemplate.prototype =
{
setContent: function (template) {
/// <summary>Sets the content template. View the Format Info Window Content help topic for more details.</summary>
/// <param name="template" type="String|Function" optional="false">The template for the content.</param>
/// <return type="InfoTemplate">InfoTemplate</return>
},
setTitle: function (template) {
/// <summary>Sets the title template. View the Format Info Window Content help topic for more details.</summary>
/// <param name="template" type="String|Function" optional="false">The template for the title.</param>
/// <return type="InfoTemplate">InfoTemplate</return>
},
toJson: function () {
/// <summary>Converts object to its ArcGIS Server JSON representation.</summary>
/// <return type="Object">Object</return>
},
};
esri.InfoWindowBase = function () {
/// <summary>The base class for the out-of-the-box InfoWindow. To create a custom info window, extend this class and adhere to the following requirements:Provide implementation for the listed methodsExpose listed propertiesFire listed eventsIt is necessary to provide a base implementation so that the custom info window provides a minimum level of functionality and works as expected. Custom info windows can define additional properties, methods and events to enhance the info window and provide a richer user experience.</summary>
/// <field name="domNode" type="Object">The reference to a DOM node where the info window is constructed. Sub-classes should define this property .</field>
/// <field name="isShowing" type="Boolean">Indicates if the info window is visible. When true the window is visible. Sub-classes should define this property.</field>
};
esri.InfoWindowBase.prototype =
{
destroyDijits: function () {
/// <summary>Helper method. Call destroy on dijits that are embedded into the specified node. Sub-classes may need to call this method before executing setContent logic to finalize the destruction of any embedded dijits in the previous content.</summary>
},
hide: function () {
/// <summary>Hide the info window. Fire the onHide event at the end of your implementation of this method to hide the info window.Sub-classes should implement this method.</summary>
},
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "hide","show"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
place: function (value,parentNode) {
/// <summary>Helper method. Place the HTML value as a child of the specified parent node.</summary>
/// <param name="value" type="String|DomNode" optional="false">A string with HTML tags or a DOM node.</param>
/// <param name="parentNode" type="DOMNode" optional="false">The parent node where the value will be placed.</param>
},
resize: function (width,height) {
/// <summary>Resize the info window to the specified width and height (in pixels).Sub-classes should implement this method.</summary>
/// <param name="width" type="Number" optional="false">The new width of the InfoWindow in pixels.</param>
/// <param name="height" type="Number" optional="false">The new height of the InfoWindow in pixels.</param>
},
setContent: function (content) {
/// <summary>Define the info window content. Sub-classes should implement this method.</summary>
/// <param name="content" type="String|Object" optional="false">The content argument can be any of the following.See the Info Template content property for details. String Text to display in the info window, can include HTML tags to format and organize the content. "This oil well has produced 100,000 bbls since 2005. Reference to an HTML element See the Info Window content property for details. Deferred object A deferred object represents a value that may not be immediately available. Your implementation should wait for the results to become available by assigning a callback function to the deferred object. </param>
},
setMap: function (map) {
/// <summary>This method is called by the map when the object is set as its info window. The default implementation provided by InfoWindowBase stores the argument to this object in a property named map and is sufficient for most use cases.</summary>
/// <param name="map" type="Map" optional="false">The map object.</param>
},
setTitle: function (title) {
/// <summary>Set the input value as the title for the info window. Sub-classes should implement this method.</summary>
/// <param name="title" type="String|Object" optional="false"> In most cases the title will be a string value but the same options are available as for the setContent method.</param>
},
show: function (location) {
/// <summary>Display the info window at the specified location. Location is an instance of esri.geometry.Point.</summary>
/// <param name="location" type="Point" optional="false"> Location is an instance of esri.geometry.Point. If the location has a spatial reference, it is assumed to be in map coordinates otherwise screen coordinates are used. Screen coordinates are measured in pixels from the top-left corner of the map control. To convert between map and screen coordinates use Map.toMap and Map.toScreen.</param>
},
startupDijits: function () {
/// <summary>Helper method. Call startup on dijits that are embedded into the specified node. Sub-classes may need to call this method right after displaying the info window, passing in a reference to the content node.</summary>
},
unsetMap: function (map) {
/// <summary>This method is called by the map when the object is no longer the map's info window. The default implementation provided by InfoWindowBase clears the argument property "map" from the object and is sufficient for most use cases.</summary>
/// <param name="map" type="Map" optional="false">The map object.</param>
},
};
esri.Map = function (divId,options) {
/// <summary>Creates a new map inside of the given HTML container, which is often a DIV element. The size of the map is the size of the container. The Map constructor can also include optional parameters. The optional parameters can be included in any order.</summary>
/// <param name="divId" type="String" optional="false">Container id for the referencing map. Required.</param>
/// <param name="options" type="Object" optional="true">Optional parameters. See options list.
/// <Number> attributionWidth
/// <Boolean> autoResize
/// <String> basemap
/// <Number[] | Point> center
/// <Boolean> displayGraphicsOnPan
/// <Extent> extent
/// <Boolean> fadeOnZoom
/// <Boolean> fitExtent
/// <Boolean> force3DTransforms
/// <InfoWindowBase> infoWindow
/// <LOD[]> lods
/// <Boolean> logo
/// <Number> maxScale
/// <Number> maxZoom
/// <Number> minScale
/// <Number> minZoom
/// <Boolean> nav
/// <String> navigationMode
/// <Number> resizeDelay
/// <Number> scale
/// <Boolean> showAttribution
/// <Boolean> showInfoWindowOnClick
/// <Boolean> slider
/// <String[]> sliderLabels
/// <String> sliderOrientation
/// <String> sliderPosition
/// <String> sliderStyle
/// <Boolean> wrapAround180
/// <Number> zoom</param>
/// <field name="attribution" type="Attribution">Reference to the attribution widget created by the map when map attribution is enabled.</field>
/// <field name="autoResize" type="Boolean">Value is true when the map automatically resizes if the browser window or ContentPane widget enclosing the map is resized. Otherwise false. Added at v.3.3.</field>
/// <field name="extent" type="Extent">The current extent of the map in map units. This property is read-only.</field>
/// <field name="fadeOnZoom" type="Boolean">Indicates if the fade effect is enabled while zooming. Only applicable when navigationMode is set to 'css-transforms'. The default value is true.</field>
/// <field name="force3DTransforms" type="Boolean">When the mapNavigation mode is set to 'css-transforms', CSS3 transforms will be used for map navigation when supported by the browser. It is recommended that you let the map determine when to enable transformations to avoid running into a known issue with scrollbar rendering on Chrome on Windows XP.</field>
/// <field name="geographicExtent" type="Extent">The extent (or bounding box) of the map in geographic coordinates. Available only when the map's spatial reference is Web Mercator or Geographic (wkid 4326).</field>
/// <field name="graphics" type="GraphicsLayer">Provides access to the Map's GraphicsLayer. The graphics object is available to use after the Map.onLoad event.</field>
/// <field name="graphicsLayerIds" type="String[]">An array of the current GraphicsLayers in the map.</field>
/// <field name="height" type="Number">Current height of the map in screen pixels.</field>
/// <field name="id" type="String">Reference to HTML DIV or other element where the map is placed on the page. This property is set in the Map constructor.</field>
/// <field name="infoWindow" type="Popup">Displays the InfoWindow on a map.</field>
/// <field name="isClickRecenter" type="Boolean">When true, the key sequence of shift then click to recenter the map is enabled.</field>
/// <field name="isDoubleClickZoom" type="Boolean">When true, double click zoom is enabled. This allows a user to zoom and recenter the map by double clicking the mouse.</field>
/// <field name="isKeyboardNavigation" type="Boolean">When true, keyboard navigation is enabled. This allows users to pan the keyboard using the arrow keys and to zoom using the + and - keys.</field>
/// <field name="isPan" type="Boolean">When true, map panning is enabled using the mouse.</field>
/// <field name="isPanArrows" type="Boolean">When true, pan arrows are displayed around the edge of the map.</field>
/// <field name="isRubberBandZoom" type="Boolean">When true, rubberband zoom is enabled. This allows users to draw a bounding box zoom area using the mouse.</field>
/// <field name="isScrollWheelZoom" type="Boolean">When true, the mouse scroll wheel zoom is enabled.</field>
/// <field name="isShiftDoubleClickZoom" type="Boolean">When true, shift double click zoom is enabled. This allows a user to zoom and recenter the map by shift + double clicking the mouse.</field>
/// <field name="isZoomSlider" type="Boolean">When true, the zoom slider is displayed on the map.</field>
/// <field name="layerIds" type="String[]">Array of current TiledMapServiceLayers and DynamicMapServiceLayers added to the map.</field>
/// <field name="loaded" type="Boolean">After the first layer is loaded, the value is set to true.</field>
/// <field name="navigationMode" type="String">Indicates whether the map uses CSS3 transformations when panning and zooming. In 'css-transform' mode the map will use CSS3 transformations, if supported by the browser, to provide a smoother experience while panning and zooming the map.</field>
/// <field name="position" type="Point">This point geometry in screen coordinates represent the top-left corner of the map container. This coordinate also acts as the origin for all screen coordinates returned by Map and GraphicsLayer events.</field>
/// <field name="root" type="DOMNode">The DOM node that contains the container of layers, build-in info window, logo and slider.</field>
/// <field name="showAttribution" type="Boolean">When true, map attribution is enabled.</field>
/// <field name="snappingManager" type="SnappingManager">If snapping is enabled on the map using map.enableSnapping() this property provides access to the SnappingManager. The snapping manager's setLayerInfo method can be used to modify the target snapping layers.</field>
/// <field name="spatialReference" type="SpatialReference">The spatial reference of the map. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.</field>
/// <field name="timeExtent" type="TimeExtent">The current TimeExtent for the map. Use the setTimeExtent method to modify the time extent.</field>
/// <field name="visible" type="Boolean">Indicates whether map is visible.</field>
/// <field name="width" type="Number">Current width of the map in screen pixels.</field>
};
esri.Map.prototype =
{
addLayer: function (layer,index) {
/// <summary>Adds an ESRI Layer to the map.The return object of Layer was added at v1.4.</summary>
/// <param name="layer" type="Layer" optional="false">Layer to be added to the map.</param>
/// <param name="index" type="Number" optional="true">A layer can be added at a specified index in the map. If no index is specified or the index specified is greater than the current number of layers, the layer is automatically appended to the list of layers in the map and the index is normalized. (As of v1.3) </param>
/// <return type="Layer">Layer</return>
},
addLayers: function (layers) {
/// <summary>Adds multiple layers to a map. The array order corresponds to the layer order in the client side map.</summary>
/// <param name="layers" type="Layer[]" optional="false">Layers to be added to the map.</param>
},
attr: function (name,value) {
/// <summary>Adds a new attribute or changes the value of an existing attribute on the map container. Removes the attribute if the value is null or undefined.</summary>
/// <param name="name" type="String" optional="false">The name of the attribute.</param>
/// <param name="value" type="The attribute's value type" optional="false">The value of the attribute. Set this value as null to remove the attribute.</param>
/// <return type="Map">Map</return>
},
centerAndZoom: function (mapPoint,levelOrFactor) {
/// <summary>Centers and zooms the map. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the operation is completed.</summary>
/// <param name="mapPoint" type="Point" optional="false">Centers the map on the specified x,y location. Starting at version 3.3, the mapPoint can be an array of longitude/latitude pairs.</param>
/// <param name="levelOrFactor" type="Number" optional="false">When using an ArcGISTiledMapServiceLayer, the map is zoomed to the level specified. When using a DynamicMapServiceLayer, the map is zoomed in or out by the specified factor. For example, use 0.5 to zoom in twice as far and 2.0 to zoom out twice as far.</param>
/// <return type="Deferred">Deferred</return>
},
centerAt: function (mapPoint) {
/// <summary>Centers the map based on map coordinates as the center point. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map has been re-centered to the given point.</summary>
/// <param name="mapPoint" type="Point" optional="false">Centers the map on the specified x,y location. Starting at version 3.3 this value can be an array of longitude/latitude pairs.</param>
/// <return type="Deferred">Deferred</return>
},
destroy: function () {
/// <summary>Destroys the map instance. After the map is destroyed it is no longer valid however you can re-use the div element of the map to create a new map instance.</summary>
},
disableClickRecenter: function () {
/// <summary>Disallows clicking on a map to center it.</summary>
},
disableDoubleClickZoom: function () {
/// <summary>Disallows double clicking on a map to zoom in a level and center the map.</summary>
},
disableKeyboardNavigation: function () {
/// <summary>Disallows panning and zooming using the keyboard.</summary>
},
disableMapNavigation: function () {
/// <summary>Disallows all map navigation except the slider and pan arrows.</summary>
},
disablePan: function () {
/// <summary>Disallows panning a map using the mouse.</summary>
},
disableRubberBandZoom: function () {
/// <summary>Disallows zooming in or out on a map using a bounding box.</summary>
},
disableScrollWheelZoom: function () {
/// <summary>Disallows zooming in or out on a map using the mouse scroll wheel.</summary>
},
disableShiftDoubleClickZoom: function () {
/// <summary>Disallows shift double clicking on a map to zoom in a level and center the map.</summary>
/// <return type="undefined">undefined</return>
},
disableSnapping: function () {
/// <summary>Disables snapping on the map.</summary>
},
enableClickRecenter: function () {
/// <summary>Permits users to click on a map to center it.</summary>
},
enableDoubleClickZoom: function () {
/// <summary>Permits users to double click on a map to zoom in a level and center the map.</summary>
},
enableKeyboardNavigation: function () {
/// <summary>Permits users to pan and zoom using the keyboard.</summary>
},
enableMapNavigation: function () {
/// <summary>Allows all map navigation.</summary>
},
enablePan: function () {
/// <summary>Permits users to pan a map using the mouse.</summary>
},
enableRubberBandZoom: function () {
/// <summary>Permits users to zoom in or out on a map using a bounding box.</summary>
},
enableScrollWheelZoom: function () {
/// <summary>Permits users to zoom in or out on a map using the mouse scroll wheel.</summary>
},
enableShiftDoubleClickZoom: function () {
/// <summary>Permits users to shift double click on a map to zoom in a level and center the map.</summary>
},
enableSnapping: function (snapOptions) {
/// <summary>Enable snapping on the map when working with the Editor, Measurement widget or the Draw and Edit toolbars.</summary>
/// <param name="snapOptions" type="Object" optional="true"> <Number> tolerance Specify the radius of the snapping circle in pixels. The default value is 15 pixels. <Object> layerInfos An array of layerInfo objects that define the snapping target layers. All values are optional. If no snapping options are set the default values will be used. <Layer> layer Reference to a feature or graphics layer that will be a target snapping layer. The default option is to set all feature and graphics layers in the map to be target snapping layers. <Boolean> snapToPoint Default is true. When true snapping to points will be enabled for layers with point geometry. <Boolean> snapToVertex Default is true. When true snapping to vertices will be enabled for layers with polyline or polygon geometry. <Boolean> snapToEdge Default is true. When true snapping to edges will be enabled for layers with polyline or polygon geometry. <SimpleMarkerSymbol> snapPointSymbol Define a symbol for the snapping location. The default symbol is a simple marker symbol with the following properties: size:15px,color:cyan,style:STYLE_CROSS. <Boolean> alwaysSnap When true, snapping is always enabled. When false users press the snapKey to enable snapping. The default value is false. <dojo.key> snapKey When alwaysSnap is set to false use this option to define the key users press to enable snapping. The default values is the CTRL key. </param>
/// <return type="SnappingManager">SnappingManager</return>
},
getBasemap: function () {
/// <summary>Returns the name of the current basemap.</summary>
/// <return type="String">String</return>
},
getInfoWindowAnchor: function (screenCoords) {
/// <summary>Sets an InfoWindow's anchor when calling InfoWindow.show.</summary>
/// <param name="screenCoords" type="Point" optional="false">The anchor point in screen units.</param>
/// <return type="String">String</return>
},
getLayer: function (id) {
/// <summary>Returns an individual layer of a map.</summary>
/// <param name="id" type="String" optional="false">ID assigned to the layer.</param>
/// <return type="Layer">Layer</return>
},
getLayersVisibleAtScale: function () {
/// <summary>Return an array of layers visible at the current scale.</summary>
/// <return type="Layer[]">Layer[]</return>
},
getLevel: function () {
/// <summary>Gets the current level of detail for the map. Valid only with an ArcGISTiledMapService layer.</summary>
/// <return type="Number">Number</return>
},
getMaxScale: function () {
/// <summary>Returns the maximum visible scale of the map. You cannot zoom-in beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint.</summary>
/// <return type="Number">Number</return>
},
getMaxZoom: function () {
/// <summary>Returns the maximum zoom level of the map. You cannot zoom in beyond this value. A value of -1 indicates that the map does not have pre-defined zoom levels.</summary>
/// <return type="Number">Number</return>
},
getMinScale: function () {
/// <summary>Returns the minimum visible scale of the map. You cannot zoom out beyond this scale. A value of 0 indicates that the map does not have a maximum scale constraint.</summary>
/// <return type="Number">Number</return>
},
getMinZoom: function () {
/// <summary>Returns the minimum zoom level of the map.You cannot zoom out beyond this value. A value of -1 indicates that the map does not have pre-defined zoom levels.</summary>
/// <return type="Number">Number</return>
},
getScale: function () {
/// <summary>Returns the current map scale.</summary>
/// <return type="Number">Number</return>
},
getZoom: function () {
/// <summary>Returns the current zoom level of the map. A value of -1 indicates that the map does not have pre-defined zoom levels.</summary>
/// <return type="Number">Number</return>
},
hidePanArrows: function () {
/// <summary>Hides the pan arrows from the map.</summary>
},
hideZoomSlider: function () {
/// <summary>Hides the zoom slider from the map.</summary>
},
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "basemap-change","click","dbl-click","extent-change","key-down","key-up","layer-add","layer-add-result","layer-remove","layer-reorder","layer-resume","layer-suspend","layers-add-result","layers-removed","layers-reordered","load","mouse-down","mouse-drag","mouse-drag-end","mouse-drag-start","mouse-move","mouse-out","mouse-over","mouse-up","mouse-wheel","pan","pan-end","pan-start","reposition","resize","time-extent-change","unload","update-end","update-start","zoom","zoom-end","zoom-start"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
panDown: function () {
/// <summary>Pans the map south. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panLeft: function () {
/// <summary>Pans the map west. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panLowerLeft: function () {
/// <summary>Pans the map southwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panLowerRight: function () {
/// <summary>Pans the map southeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panRight: function () {
/// <summary>Pans the map east. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panUp: function () {
/// <summary>Pans the map north. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panUpperLeft: function () {
/// <summary>Pans the map northwest. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
panUpperRight: function () {
/// <summary>Pans the map northeast. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the pan operation is completed.</summary>
/// <return type="Deferred">Deferred</return>
},
removeAllLayers: function () {
/// <summary>Removes all layers from the map.The map's extent, spatial reference, and tiling scheme if defined do not change when the layers are removed. When the next layer is added to the map, this layer is displayed at the same extent and spatial reference.</summary>
},
removeLayer: function (layer) {
/// <summary>Removes the specified layer from the map.</summary>
/// <param name="layer" type="Layer" optional="false">Layer to be removed from the map. The map's extent, spatial reference, and tiling scheme if defined do not change when the layer is removed. When the next layer is added to the map, this layer is displayed at the same extent and spatial reference.</param>
},
reorderLayer: function (layer,index) {
/// <summary>Changes the layer order in the map.</summary>
/// <param name="layer" type="Layer" optional="false">The layer to be moved. (As of v1.4) Beginning with version 1.4, use this parameter in place of "layerId". In versions prior to v1.4, use "layerID" in place of "layer". Type: <String>Definition: The ID of the layer to be moved. This ID is assigned in Layer.id.</param>
/// <param name="index" type="Number" optional="false">Refers to the location for placing the layer. The bottom most layer has an index of 0.</param>
},
reposition: function () {
/// <summary>Repositions the map DIV on the page. This method should be used after the map DIV has been repostioned.</summary>
},
resize: function (immediate) {
/// <summary>Resizes the map DIV. This method should be used after the map DIV has been resized.</summary>
/// <param name="immediate" type="Boolean" optional="true">By default, the actual resize logic is delayed internally in order to throttle spurious resize events dispatched by some browsers. In cases where you explicitly call this method in a one-and-done situation, you can use the boolean immediate argument to indicate that the resize logic should be applied immediately without any delay.</param>
},
setBasemap: function (basemap) {
/// <summary>Change the map's current basemap.</summary>
/// <param name="basemap" type="String" optional="false">A valid basemap name. Valid values are: "streets" , "satellite" , "hybrid", "topo", "gray", "oceans", "national-geographic", "osm".</param>
},
setExtent: function (extent,fit) {
/// <summary>Sets the extent of the map. The extent must be in the same spatial reference as the map.At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the extent change has been committed by the map.</summary>
/// <param name="extent" type="Extent" optional="false">Sets the minx, miny, maxx, and maxy for a map.</param>
/// <param name="fit" type="Boolean" optional="true">When true, for maps that contain tiled map service layers, you are guaranteed to have the input extent shown completely on the map. The default value is false. (As of v1.3) </param>
/// <return type="Deferred.">Deferred.</return>
},
setLevel: function (level) {
/// <summary>Sets the map to the specified level. Zooms to the new level based on the current map center point. Valid only with an ArcGISTiledMapService layer.At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.</summary>
/// <param name="level" type="Number" optional="false">The level ID.</param>
/// <return type="Deferred">Deferred</return>
},
setMapCursor: function (cursor) {
/// <summary>Sets the default cursor for the map. This cursor is shown whenever the mouse is pointed over the map, except when panning by dragging the map or using SHIFT+Drag to zoom. If not set, the map uses the platform-dependent default cursor, usually an arrow.</summary>
/// <param name="cursor" type="String" optional="false">A standard CSS cursor value. Some common values include "default", "pointer", "crosshair", "text", "help", and "wait".</param>
},
setScale: function (scale) {
/// <summary>Sets the map scale to the specified value. The value must be greater than 0.At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the map scale has been changed.</summary>
/// <param name="scale" type="Number" optional="false">A map scale value greater than 0.</param>
/// <return type="Deferred">Deferred</return>
},
setTimeExtent: function (timeExtent) {
/// <summary>Sets the TimeExtent for the map.</summary>
/// <param name="timeExtent" type="TimeExtent" optional="false">Set the time extent for which data is displayed on the map.</param>
},
setTimeSlider: function (timeSlider) {
/// <summary>Set the time slider associated with the map.</summary>
/// <param name="timeSlider" type="TimeSlider" optional="false">The time slider dijit to associate with the map.</param>
},
setVisibility: function (visible) {
/// <summary>Show or hide the map.</summary>
/// <param name="visible" type="Boolean" optional="false">If true, map will be visible.</param>
/// <return type="Map">Map</return>
},
setZoom: function (zoom) {
/// <summary>Set the map zoom level to the given value. At version 3.4, this method returns a deferred object. You can add a callback to the deferred object and get notified after the zoom level has been changed.</summary>
/// <param name="zoom" type="Number" optional="false">A valid zoom level value.</param>
/// <return type="Deferred">Deferred</return>
},
showPanArrows: function () {
/// <summary>Shows the pan arrows on the map.</summary>
},
showZoomSlider: function () {
/// <summary>Shows the zoom slider on the map.</summary>
},
toMap: function (screenPoint) {
/// <summary>Converts a single screen point or an array of screen points to map coordinates.</summary>
/// <param name="screenPoint" type="ScreenPoint | Point" optional="false">Converts screen coordinates to map coordinates. Starting at version 3.3, screenPoint should be an instance of ScreenPoint.</param>
/// <return type="Point">Point</return>
},
toScreen: function (mapPoint) {
/// <summary>Converts a single map point or an array of map points to screen coordinates.</summary>
/// <param name="mapPoint" type="Point" optional="false">Converts map coordinates to screen coordinates.</param>
/// <return type="Point">Point</return>
},
};
esri.OperationBase = function (params) {
/// <summary>Creates a new OperationBase object.</summary>
/// <param name="params" type="Object" optional="false">See options list for parameters.
/// <String> label
/// <String> type</param>
/// <field name="label" type="String">Details about the operation, for example: "Update" may be the label for an edit operation that updates features.</field>
/// <field name="type" type="String">The type of operation, for example: "edit" or "navigation".</field>
};
esri.OperationBase.prototype =
{
performRedo: function () {
/// <summary>Re-perform the last undo operation. When inherting from OperationBase provide a custom implementation for this method.</summary>
},
performUndo: function () {
/// <summary>Reverse the operation. When inheriting from OperationBase provide a custom implementation for this method.</summary>
},
};
esri.ServerInfo = function () {
/// <summary>This class contains information about an ArcGIS Server and its token endpoint.</summary>
/// <field name="adminTokenServiceUrl" type="String">The token service URL used to generate tokens for ArcGIS Server Admin resources.</field>
/// <field name="currentVersion" type="Number">Version of the ArcGIS Server REST API deployed on this server. For example 10.0, 10.1</field>
/// <field name="server" type="String">Server URL in the following format: scheme://host[:port]</field>
/// <field name="shortLivedTokenValidity" type="Number">Validity of short-lived token in minutes.</field>
/// <field name="tokenServiceUrl" type="String">The token service URL used to generate tokens for the secured resources on the server.</field>
};
esri.ServerInfo.prototype =
{
toJson: function () {
/// <summary>Return the properties of this object in JSON.</summary>
/// <return type="Object">Object</return>
},
};
esri.SnappingManager = function (options) {
/// <summary>Create a new SnappingManager object. It is not required to create a SnappingManager object to enable snapping for the Editor, Measurement or Draw and Edit Toolbars. To enable snapping, call the map's enableSnapping method. Create a new snapping manager object if the default options need to be modified.</summary>
/// <param name="options" type="Object" optional="true">Optional parameters. See options list.
/// <Boolean> alwaysSnap
/// <Object[]> layerInfos
/// <Map> map
/// <dojo.keys> snapKey
/// <SimpleMarkerSymbol> snapPointSymbol
/// <Number> tolerance</param>
};
esri.SnappingManager.prototype =
{
destroy: function () {
/// <summary>Destroy the SnappingManager object. All related objects will be set to null.</summary>
},
getSnappingPoint: function (screenPoint) {
/// <summary>Returns a deferred object, which can be added to a callback to find the snap point.</summary>
/// <param name="screenPoint" type="Point" optional="false">The input screen point for which to find the snapping location.</param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
setLayerInfos: function (setLayerInfos) {
/// <summary>An array of layerInfo objects used to specify the target snapping layers.</summary>
/// <param name="setLayerInfos" type="Object[]" optional="false">An array of layerInfo objects that define the snapping target layers. All values are optional. If no snapping options are set the default values will be used. <Layer> layer Reference to a feature or graphics layer that will be a target snapping layer. The default option is to set all feature and graphics layers in the map to be target snapping layers. <Boolean> snapToPoint Default is true. When true snapping to points will be enabled for layers with point geometry. <Boolean> snapToVertex Default is true. When true snapping to vertices will be enabled for layers with polyline or polygon geometry. <Boolean> snapToEdge Default is true. When true snapping to edges will be enabled for layers with polyline or polygon geometry. </param>
},
};
esri.SpatialReference = function (json) {
/// <summary>Creates a new SpatialReference object.</summary>
/// <param name="json" type="Object" optional="false">The REST JSON representation of the spatial reference: {"wkid" : <wkid>}</param>
/// <field name="wkid" type="Number">The well-known ID of a spatial reference. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.</field>
/// <field name="wkt" type="String">The well-known text that defines a spatial reference.</field>
};
esri.SpatialReference.prototype =
{
equals: function (sr) {
/// <summary>Returns true if the input spatial reference object has the same wkid or wkt as this spatial reference object. Returns false otherwise.</summary>
/// <param name="sr" type="SpatialReference" optional="false">The spatial reference to compare.</param>
/// <return type="Boolean">Boolean</return>
},
isWebMercator: function () {
/// <summary>Returns true if the wkid of the spatial reference object is one of the following values: 102113, 102100, 3857</summary>
/// <return type="Boolean">Boolean</return>
},
toJson: function () {
/// <summary>Returns an easily serializable object representation of the spatial reference.</summary>
/// <return type="Object">Object</return>
},
};
esri.TimeExtent = function (startTime,endTime) {
/// <summary>Creates a new TimeExtent object with the specifed start and end time. If the startTime is null or undefined the start time is negative infinity. If the endTime is null or undefined the endTime is positive infinity. To represent an instant in time set the startTime and endTime to the same time value.</summary>
/// <param name="startTime" type="Date" optional="false">The start time for the specified time extent.</param>
/// <param name="endTime" type="Date" optional="false">The end time for the specified time extent.</param>
/// <field name="endTime" type="Date">The end time for the specified time extent.</field>
/// <field name="startTime" type="Date">The start time for the specified time extent.</field>
};
esri.TimeExtent.prototype =
{
intersection: function (timeExtent) {
/// <summary>Returns a new time extent indicating the intersection between "this" and the argument time extent.</summary>
/// <param name="timeExtent" type="Number" optional="false">The input time extent.</param>
/// <return type="TimeExtent">TimeExtent</return>
},
offset: function (offsetValue,offsetUnits) {
/// <summary>Returns a new time extent with the given offset from "this' time extent.</summary>
/// <param name="offsetValue" type="Number" optional="false">The length of time to offset from "this" time extent.</param>
/// <param name="offsetUnits" type="String" optional="false">The offset units, see the TimeInfo constants for a list of valid values.</param>
/// <return type="TimeExtent">TimeExtent</return>
},
};
esri.UndoManager = function (options) {
/// <summary>Creates a new UndoManager object.</summary>
/// <param name="options" type="Object" optional="false">See options list for parameters.
/// <Number> maxOperations</param>
/// <field name="canRedo" type="Boolean">When true, there are redo operations available on the stack.</field>
/// <field name="canUndo" type="Boolean">When true, there are undo operations available on the stack.</field>
/// <field name="length" type="Integer">The number of operations stored in the history stack.</field>
/// <field name="position" type="Integer">The current operation position. A position value of 0 means that no operations are available on the stack. When an undo operation is performed the position decreases by 1. When a redo occurs the position is incremented by 1.</field>
};
esri.UndoManager.prototype =
{
add: function (operation) {
/// <summary>Adds an undo operation to the stack and clears the redo stack.</summary>
/// <param name="operation" type="Operation" optional="false">An operation to add to the stack.</param>
},
clearRedo: function () {
/// <summary>Clear the redo stack</summary>
},
clearUndo: function () {
/// <summary>Clear the undo stack.</summary>
},
destroy: function () {
/// <summary>Destroy the operation manager. Sets the history stack to null and cleans up all references.</summary>
},
get: function (operation) {
/// <summary>Get the specified operation from the stack.</summary>
/// <param name="operation" type="Operation" optional="false">The operation id.</param>
/// <return type="Operation">Operation</return>
},
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "add","change","redo","undo"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
peekRedo: function () {
/// <summary>Get the next redo operation from the stack</summary>
/// <return type="Operation">Operation</return>
},
peekUndo: function () {
/// <summary>Get the next undo operation from the stack.</summary>
/// <return type="Operation">Operation</return>
},
redo: function () {
/// <summary>Moves the current position to the next redo operation and calls the operation's performRedo() method.</summary>
},
remove: function (operation) {
/// <summary>Remove the specified operation from the stack.</summary>
/// <param name="operation" type="Operation" optional="false">The operation id.</param>
/// <return type="Operation">Operation</return>
},
undo: function () {
/// <summary>Moves the current position to the next undo operation and calls the operation's performUndo method.</summary>
},
};
esri.Units = function () {
/// <summary>ESRI unit constants.</summary>
};
esri.arcgis = function () {
/// <summary>The esri.arcgis namespace.</summary>
};
esri.arcgis.Portal = function (url) {
/// <summary>Creates a new Portal object.</summary>
/// <param name="url" type="String" optional="false">The url to the ArcGIS.com site or in-house portal.</param>
/// <field name="access" type="String">The access level of the organization. When public, anonymous users can access the organization. When private access is restricted to only members of the organization.</field>
/// <field name="allSSL" type="Boolean">When true, access to the organization's Portal resources must occur over SSL.</field>
/// <field name="basemapGalleryGroupQuery" type="String">The query that defines the basemaps that are displayed in the Basemap Gallery.</field>
/// <field name="canSearchPublic" type="Boolearn">When true, the organization's public items, groups and users are included in search queries. When false, no public items outside of the organization are included. However, public items which are part of the organization are included.</field>
/// <field name="canSharePublic" type="Boolean">When true, members of the organization can share resources outside the organization.</field>
/// <field name="created" type="Date">Date the organization was created.</field>
/// <field name="culture" type="String">The default locale (language and country) information.</field>
/// <field name="defaultBasemap" type="Object">The default basemap the portal displays in the map viewer. Returns an object that provides the url and title to the default basemap service.</field>
/// <field name="defaultExtent" type="Object">The default extent for the map the portal displays in the map viewer. The extent will be in the default basemap's spatial reference.</field>
/// <field name="description" type="String"> A description of the organization / portal.</field>
/// <field name="featuredGroups" type="Object[]">The featured groups for the portal. Returns an array of objects that provide access to the owner and title for each featured group.</field>
/// <field name="featuredItemsGroupQuery" type="String">The query that defines the featured group. If null, then the most viewed items in the organization will be the featured items.</field>
/// <field name="id" type="String">The id of the organization that owns this portal. If null then this is the default portal for anonymous and non organizational users.</field>
/// <field name="isOrganization" type="Boolean">Indicates if the portal is an organization.</field>
/// <field name="layerTemplatesGroupQuery" type="String">The query that defines the collection of editable layer templates.</field>
/// <field name="modified" type="Date">Date the organization was last modified.</field>
/// <field name="name" type="String">The Name of the organization / portal.</field>
/// <field name="portalMode" type="String">Denotes multitenant or singletenant.</field>
/// <field name="portalName" type="String">The name of the portal i.e. ArcGIS Online.</field>
/// <field name="symbolSetsGroupQuery" type="String">The query that defines the symbols sets used by the map viewer.</field>
/// <field name="templatesGroupQuery" type="String">The query that defines the collection of templates that will appear in the template gallery.</field>
/// <field name="thumbnailUrl" type="String">The url to the thumbnail of the organization.</field>
/// <field name="url" type="String">The portal url.</field>
};
esri.arcgis.Portal.prototype =
{
getPortalUser: function () {
/// <summary>Returns a PortalUser object that describes the user currently signed in to the portal.</summary>
/// <return type="PortalUser">PortalUser</return>
},
on: function (event,callback) {
/// <summary>Trigger a callback function when an event happens.</summary>
/// <param name="event" type="String" optional="false">One of the following event names: "load"</param>
/// <param name="callback" type="Function" optional="false">A callback function with a returned object as the first variable.</param>
},
queryGroups: function (queryParams) {
/// <summary>Execute a query against the Portal to return a deferred that when resolved returns PortalQueryResult that contain a results array of PortalGroup objects for all the groups that match the input query.</summary>
/// <param name="queryParams" type="PortalQueryParams" optional="true">The input query parameters.</param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
queryItems: function (queryParams) {
/// <summary>Execute a query against the Portal to return a deferred that when resolved returns PortalQueryResult that contain a results array of PortalItem objects that match the input query.</summary>
/// <param name="queryParams" type="PortalQueryParams" optional="true">The input query parameters.</param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
queryUsers: function (queryParams) {
/// <summary>Execute a query against the Portal to return a deferred that when resolved returns PortalQueryResult that contain a results array of PortalUser objects that match the input query.</summary>
/// <param name="queryParams" type="PortalQueryParams" optional="true">The input query parameters.</param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
signIn: function () {
/// <summary>Prompts the user using the IdentityManager and returns a deferred that when resolved returns the PortalUser for the input credentials.</summary>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
signOut: function () {
/// <summary>Sign out of the Portal which resets the Portal and disables identity checking.</summary>
/// <return type="Portal">Portal</return>
},
};
esri.arcgis.PortalComment = function () {
/// <summary>Details about a comment on a Portal item.View the ArcGIS Portal API REST documentation for the item comment for more details.</summary>
/// <field name="comment" type="String">The comment text.</field>
/// <field name="created" type="String">The date and time the comment was created.</field>
/// <field name="id" type="String">The comment id.</field>
/// <field name="owner" type="String">The user name of the user who created the comment.</field>
};
esri.arcgis.PortalFolder = function () {
/// <summary>The PortalFolder class provides information about folders used to organize content in a portal. Folders are only visible to the user and are used for organizing content within the user's content space.</summary>
/// <field name="created" type="Date">The date the folder was created.</field>
/// <field name="id" type="String">The id of the folder.</field>
/// <field name="portal" type="Portal">The portal for the folder.</field>
/// <field name="title" type="String">The title of the folder.</field>
/// <field name="url" type="String">The url to to the folder.</field>
};
esri.arcgis.PortalFolder.prototype =
{
getItems: function () {
/// <summary>Find all the items in the folder. Returns a deferred that when resolved provides access to an array of PortalItem objects.</summary>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
};
esri.arcgis.PortalGroup = function () {
/// <summary>The group resource represents a group within the Portal. A group resource represents a group (e.g., "San Bernardino Fires"). The visibility of the group to other users is deteremined by the access property. If the group is private no one except the administrators and the members of the group will be able to see it. If the group is shared with an organization, then all members of the organization will be able to find the group. View the ArcGIS Portal API REST documentation for the Group for more details. </summary>
/// <field name="access" type="String">The access privileges on the group which determines who can see and access the group. Can be: private, org, or public.</field>
/// <field name="created" type="Date">The date the group was created.</field>
/// <field name="description" type="String">A detailed description of the group.</field>
/// <field name="id" type="String">The id for the group.</field>
/// <field name="isInvitationOnly" type="Boolean">If this is set to true, then users will not be able to apply to join the group.</field>
/// <field name="isViewOnly" type="boolean">Denotes a view only group where members are not able to share items. The default value is false. </field>
/// <field name="modified" type="Date">The date the group was last modified.</field>
/// <field name="owner" type="Portal">The username of the group's owner.</field>
/// <field name="portal" type="Portal">The portal for the group.</field>
/// <field name="snippet" type="String">A short summary that describes the group.</field>
/// <field name="tags" type="String[]">User defined tags that describe the group.</field>
/// <field name="thumbnailUrl" type="String">The url to the thumbnail used for the group.</field>
/// <field name="title" type="String">The title for the group. This is the name that is displayed to users and by which they refer to the group. Every group must have a title and it must be unique for a user.</field>
/// <field name="url" type="String">The url to the group.</field>
};
esri.arcgis.PortalGroup.prototype =
{
getMembers: function () {
/// <summary>Get the current members for the group. Returns a deferred that when resolved provides access to a PortalGroupMembers object.</summary>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
queryItems: function (queryParams) {
/// <summary>Execute a query against the group to return a deferred that when resolved returns PortalQueryResults that contain a results array of PortalItem objects that match the input query.</summary>
/// <param name="queryParams" type="PortalQueryParams" optional="true">The input query parameters.</param>
/// <return type="dojo.Deferred">dojo.Deferred</return>
},
};
esri.arcgis.PortalGroupMembers = function () {
/// <summary>List the users, owner and administrator of a group. Only available to members or administrators of the group. View the ArcGIS Portal API REST documentation for the Group Users for more details.</summary>
/// <field name="admins" type="String[]">An array containing the user names for each administrator of the group.</field>
/// <field name="owner" type="String">The user name of the owner of the group.</field>
/// <field name="users" type="String[]">An array containing the user names for each user in the group.</field>
};