Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Layer{T}"/> class.
 /// </summary>
 /// <param name="url">Layer url (ends with the layer id).</param>
 /// <param name="user">User name.</param>
 /// <param name="password">Password.</param>
 /// <param name="tokenUrl">Generate token url (defaults to ArcGIS Online).</param>
 public Layer(string url, string user, string password, string tokenUrl = "https://www.arcgis.com/sharing/rest/generateToken")
 {
     this.token = string.IsNullOrEmpty(user) || string.IsNullOrEmpty(password) ? null : new Token(tokenUrl, user, password);
     Url        = url;
     LayerInfo  = Esri.GetLayer(url, Token).Result;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Layer{T}"/> class.
 /// </summary>
 /// <param name="url">Layer url (ends with the layer id).</param>
 /// <param name="token">Token.</param>
 public Layer(string url, string?token = null)
 {
     this.token = token is null ? null : new Token(token);
     Url        = url;
     LayerInfo  = Esri.GetLayer(url, Token).Result;
 }