POST
|
Robert, Thanks for looking at this with me. I appreciate the help. That is basically what I'm doing but I think since the oil service only has one layer its working but mine with 12 layers and layer 6 having the min/max it seems I can't change the min max of the 6th layer. It would be like TaxParcel/AssessorsValueAnalysis (MapServer) on the samplewserver1 with the multiple layers and trying to change layer 2 when the service just connects to sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsValueAnalysis/MapServer Not sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsValueAnalysis/MapServer/2 Does that seem like it might be the problem? Thanks Jim
... View more
07-26-2016
07:40 AM
|
0
|
1
|
631
|
POST
|
I've tried a few ways to do this, this is a combination of them. I tried setting it in the creation of LinkedMap as a Image parameter. Then I tried setting the scale with setscaleRange and setMinScale. The map has 10 layers and only some have a minscale. With the screen I'm working on its fine if I could reset the minscale on all of them. //attempted min scale as imageParameters var imageParameters = new ImageParameters(); imageParameters.minScale = 0; // create map with all layers based on map service LinkedMap = new esri.layers.ArcGISDynamicMapServiceLayer(mapServices.MapService, { "id": "baseLayer", "requestTimeout": 5000, "attribution": false, "imageParameters": imageParameters }); //this code is in the load event of LinkedMap // Layer id 2 of 10 has a minscale and isn't displaying. // when linked map loaded //LinkedMap.setScaleRange(0, 0); LinkedMap.setMinScale(0);
... View more
07-26-2016
06:13 AM
|
0
|
1
|
631
|
POST
|
I'm creating a arcGisDynamicMapServiceLayer group. One of the layers has a minScale I need to change. I can't seem to change it. I'd be happy if I could set min layer for it or all the layers but setMinScale doesn't seem to change anything.
... View more
07-25-2016
12:15 PM
|
0
|
5
|
1408
|
POST
|
I am wokring on an app that I'm updating to use Secure Services. If I'm running from a map on my Arcgis server I can retrive a token and generate the map and everything runs fine. If I let he sign in popup come up I login with the userid /password it works fine. If i run against the map with it published as public it works fine. If I run against a map on Arcgis Online I can get a token but I my map never returns. If i run against the map with it published as public it works fine. I assume the issue is with the token or how i'm creating the map. I've tried adding a referer ip and tried using the RquestIP. I'm getting the token with the following : if (tokenUrl != "") { //####################### var data = new NameValueCollection(); //data["client_id"] = username; //data["client_secret"] = password; data["username"] = username; data["password"] = password; data["expires"] = "2440"; data["client"]="RequestIP"; data["f"] = "json"; JavaScriptSerializer jserialize = new JavaScriptSerializer(); TokenInfo x = jserialize.Deserialize<TokenInfo>(_getResponse(data, tokenUrl)); myToken = x.token; var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); var expire = epoch.AddMilliseconds(x.expires).ToLocalTime(); dictionary.Add("token", myToken); dictionary.Add("expire",expire.ToString()); return dictionary; } else { dictionary.Add("token",""); return dictionary; } } public class TokenInfo { public string token { get; set; } public long expires { get; set; } public bool ssl { get; set; } } private string _getResponse(NameValueCollection data, string url) { string responseData; var webClient = new WebClient(); var response = webClient.UploadValues(url, data); responseData = System.Text.Encoding.UTF8.GetString(response); ; } } I do get a token value back. I'm creating the map through configOptions = { webmap: arcgisID, title: "", subtitle: "", sharingurl: "https://tylergis.maps.arcgis.com/sharing/rest/content/items/" }; arcgisUtils.createMap(configOptions, "map").then(function (response) { I do have it set to go through the proxy page where it should be handling adding the token. When I run this against the sercure services on my local arcgis server it does work . I did try registering the token before this call but it didn't help. var tokenOptions = { expires: 1454341793222, ssl: true, client:"RequestIP", token: "6p-T1f4xsDozwO9mvGgeN_f8h89u2yeK5FsJPEo-1cRS6IWtwV5XjWofswW6_dAkJ1XNRVHF-7bWbNDqL70z_hyzZF4Dx3BxXbM0uELElCFjz5ikOSAjCCZA0Fm7JAUO6sjy7dg7ogLQThsqjEniIQ..", userid: "myuserid" } EsriId.registerToken(tokenOptions); (response) { I've been assuming that the referer information I'm providing is wrong but at this point I'm not sure. Thanks Jim
... View more
02-01-2016
06:40 AM
|
0
|
0
|
2047
|
POST
|
I'm having trouble retriving a token to access a secure service online. I'm using a developer account. When I run it against a local install of ArcGIS Server it works fine I'm not 100% sure what the tokenurl would be and if the userid /password would just be the login I have for my developer site. Thanks Jim I'm using code similar to the following to retrive the token: public Dictionary<string, string> GetToken(string username, string password, string tokenUrl) Dictionary<string, string> dictionary = new Dictionary<string, string>(); MapTalk mt = new MapTalk(); var myToken = ""; if (tokenUrl != "") //####################### var data = new NameValueCollection(); "username"] = username; "password"] = password; "expires"] = "1"; "f"] = "json"; JavaScriptSerializer jserialize = new JavaScriptSerializer(); TokenInfo x = jserialize.Deserialize<TokenInfo>(_getResponse(data, tokenUrl)); var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); var expire = epoch.AddMilliseconds(x.expires).ToLocalTime(); "token", myToken); "expire",expire.ToString()); return dictionary; else "token",""); return dictionary; public class TokenInfo public string token { get; set; } public long expires { get; set; } public bool ssl { get; set; } private string _getResponse(NameValueCollection data, string url) string responseData; var webClient = new WebClient(); var response = webClient.UploadValues(url, data); Encoding.UTF8.GetString(response); return responseData;
... View more
01-27-2016
08:30 AM
|
0
|
2
|
2316
|
POST
|
The token worked fine. I had two issue the token was being generated off a different machine than I was accessing and the url was being generated incorrectly. Once I corrected those issues everything was fine. /DemoMapSecure/MapServer/layers?f=json&token=thFg7E-bxSV3rQLch0npGE5wl-kaJpGq1l4Rj0VDj12KAeG615HCneyx65QE2Flb
... View more
11-16-2015
06:40 AM
|
0
|
0
|
288
|
POST
|
I have .net app that retrieves avialable layers and fields to populate a report. This application currently doesn't have any esri api's involved in it. I have been getting this information using the following C# code in mapserver r= "https://xxx.xxxxxxx.com/arcgis/rest/services/DemoMap/MapServer" string url = mapserver + (mapserver.Substring(mapserver.Length) == "/" ? "" : "/") + "layers?f=json"; var request = WebRequest.Create(url); "application/json; charset=utf-8"; string text; var response = (HttpWebResponse)request.GetResponse(); using (var sr = new StreamReader(response.GetResponseStream())) { text = sr.ReadToEnd(); } JavaScriptSerializer jserialize = new JavaScriptSerializer(); layers mylayers = jserialize.Deserialize<layers>(text); return mylayers; I now have a map they wish to secure. I'm not sure how I can still retrive the information. It intially says token missing I manually generated one and concatinated it on to the url. With that I'm getting the login page asking for userid and password. Any help would be apprececiated.
... View more
11-13-2015
11:44 AM
|
0
|
1
|
3502
|
POST
|
That will do exactly what I need. Thanks for the help!
... View more
10-09-2014
04:38 AM
|
0
|
0
|
518
|
POST
|
Ken , Thanks for the response. I'm not sure if I can get what I want from that, although it could just be me. I can see that the map.getLayer("baseLayer") Is a dynamic layer using that but I want to see if the map layer listed in layerinfo is of type raster. I can't seem to get to that maybe I'm not hitting the sublayer. My base layer is a esri.layers.ArcGISDynamicMapServiceLayer tied to a rest service for a map that has multiple layers. If I look at the service directly and choose a layer I see : Layer: Aerial (10) Name: Aerial Display Field: Type: Raster Layer Geometry Type: null Description: Definition Expression: Copyright Text: Default Visibility: true MaxRecordCount: 0 Supported Query Formats: JSON, AMF I may just be missing something but I can't seem to get something that tells me that this layer is raster? Thanks Jim
... View more
10-08-2014
12:32 PM
|
0
|
2
|
518
|
POST
|
I have a map with an unknown number of feature layers and raster layers. I need to be able to identify if a layer is a raster layer or a feature layer. I can't seem to find any where this is exposed. I tried looking in the map.getLayer("baseLayer").layerInfos collection but it doesn't have the type. In the Silverlight API I found this information when the legened was refreshed by checking the layerType field in the layeritems . I can't seem to find anything similar in the javascript api. Thanks Jim
... View more
10-08-2014
11:22 AM
|
0
|
4
|
4612
|
POST
|
It looks like the event was bubbling up. The event.stopPropagation() in the other thread did fix it. I'll correct my tagging Thanks for the help.
... View more
07-22-2014
09:48 AM
|
0
|
1
|
376
|
POST
|
I have a map where a user can click and select a parcel. Its working fine in ie and firefox but in chrome after I've selected the parcel and added a graphic to highlight it I'm ending up stuck in pan mode. The mouse icon changes to the four arrows and any mouse movement moves the map. If I turn off paning on the map this stops the issue but I need to allow paning . Anybody else seeing this in Chrome?
... View more
07-22-2014
08:12 AM
|
1
|
4
|
2603
|
POST
|
Not sure why it wouldn't zoom but realized the 2d service is on extended support and changed to the world street map and everything worked fine as is. http://www.arcgis.com/home/item.html?id=3b93337983e9436f8db950e38a8629af Thanks Jim
... View more
04-09-2014
10:41 AM
|
0
|
0
|
252
|
POST
|
I have a map with a spatial reference of 102748 (2285) and want to use http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer as a background layer. This map has a wkid of 4326 (4326) . Once I've added them I want to zoom to my map with the wkid 4326. I'm adding the layers map.addLayers([backgroundMapLayer, LinkedMap]); // map.addLayers([102748 , 4326]); What should I be using to the map extent. I've tried using the linkedMap full exent min/max xy coordinate and wkid of 102746. I've also tried to set it to background min/max xy coordinate and wkid of 4326 I've then tried to zoom the map and get the whole world ( I can manually zoom and center and see my map layer over the base map in the correct place) or 0,0 off of Africa. If someone could explain to me what I should be setting my initial map extent so when I run map.setZoom or map.centerAndZoom(map.getLayer("baseLayer").fullExtent.getCenter(), 5) it zooms to where my map I'd appreciate it. I'm believe I'm missing how I reconcile the different wkid. Thanks Jim
... View more
04-08-2014
06:40 AM
|
0
|
1
|
569
|
Title | Kudos | Posted |
---|---|---|
1 | 07-22-2014 08:12 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|