POST
|
Thanks Robert, I think this is just what I was looking for. I have it set up like this var secRealEstate = esriRequest({
url: "myURL",
timeout: 100 //Set this in milliseconds
});
secRealEstate.then(requestSucceeded, requestFailed);
function requestSucceeded(){
alert("Data was retrieved");
}
function requestFailed(){
alert("Data was NOT retrieved");
} But even when using the non-secured url, it always comes back with requestFailed. Do you see anything I've done incorrectly? (If I don't set a timeout, it seems my map never reaches the "update-end" event).
... View more
02-26-2016
04:09 PM
|
0
|
2
|
573
|
POST
|
I have a map service ie. var layerAgreementsOnly = new ArcGISDynamicMapServiceLayer("Census (MapServer) "); What if I want to change the url? So if I get a security error when loading the map, I would like to switch out the existing url for another one that the user has permission to view. But I'm not sure the syntax or if this is possible. layerAgreementsOnly.on("error", function(result){
var errCode = result.error.code.toString();
//Test if a 403 security error has been received
if (errCode.indexOf("403" > -1)){
// code to update url here?
}
console.log("Error " + errCode + ": " + result.error.message);
});
... View more
02-26-2016
02:30 PM
|
0
|
4
|
2336
|
POST
|
Thanks for responding - anything is helpful, I will give that a try.
... View more
02-25-2016
08:28 AM
|
0
|
0
|
1018
|
POST
|
Hi, I'm wondering if you figured out how to catch this error before adding the layers to the map? I can see the dojo error in my console before the layers are actually added, so there must be some way to catch it. I have the same situation, where I have some secured layers that cause this error to fire, which causes "layers-add-result" not to fire - but only in Internet Explorer, and not consistently - sometimes "layers-add-result" will fire! It always works perfectly in Chrome. I need to catch this error prior to adding the secured layers, so I can just skip adding them.
... View more
02-25-2016
08:17 AM
|
0
|
2
|
1018
|
POST
|
Hi Robert, this has been a huge help. I have it working with my data. I have one final question, because I would like for the first feature in the array (first feature that shows up in the infoWindow) to be the feature the user clicked on. Currently it starts with the first item in the array, which geographically could be elsewhere on the map. I don't have a great grasp of callback functions or deferred lists. I know I would have to reorder the array depending on which feature is the "selected feature", which is fine enough if I know how to access the array elements. As far as I can tell queryDeferred is an array of arrays? If I log it to the console it tells me there are two results, one empty and one containing the 1000 items from the query. Do you know how I can access these 1000 items to reorder them?
... View more
02-24-2016
03:43 PM
|
0
|
8
|
800
|
POST
|
Wanted to add - if you comment out the "if" section, the identify still runs and shows data for the points in the infoWindow. As you can see it's saying "No information available".
... View more
02-22-2016
03:09 PM
|
0
|
10
|
800
|
POST
|
Thanks Robert, that fixed it. I've not quite gotten it working, I think something might be going wrong with the query but I'm not sure what or why. I have a jsfiddle: Edit fiddle - JSFiddle I don't have queryDeferred in mapObj.infoWindow.setFeatures because when I add it, the infoWindow doesn't pop up at all.
... View more
02-22-2016
03:07 PM
|
0
|
0
|
800
|
POST
|
Hi Robert, Thanks so much for your guidance. I'm trying to get this working but I'm getting an error on lang.hitch. Looking at the API reference, I changed it to esriLang.hitch but still getting an error ("TypeError: esriLang.hitch" is not a function) - hitch isn't mentioned in the "lang" section of the reference, what does it do? esri/lang | API Reference | ArcGIS API for JavaScript
... View more
02-22-2016
01:48 PM
|
0
|
13
|
800
|
POST
|
I see, you took off the outline var symbol = new SimpleMarkerSymbol({ "color": [0,0,0,1], "size": 12, "angle": -30, "xoffset": 0, "yoffset": 0, "type": "esriSMS", "style": "esriSMSCircle", "outline": { "color": [255,0,191], "width": 0, "type": "esriSLS", "style": "esriSLSSolid" } });
... View more
02-18-2016
12:38 PM
|
0
|
1
|
712
|
POST
|
Setting "color" to [0,0,0,0] didn't work, but setting "size" to 0 did. Thanks! Default behavior is good enough for me.
... View more
02-18-2016
12:20 PM
|
0
|
3
|
776
|
POST
|
I agree the behavior is different - this seems like a workaround rather than the way the API is intended to function...when I added this code into my own map, I get both the custom highlight and something that looks like the default highlight (cyan color). See it here Edit fiddle - JSFiddle
... View more
02-18-2016
11:43 AM
|
0
|
5
|
776
|
POST
|
Hi Kelly, thanks for this - it is working for me. But are they sure this is not a bug? What is the rationale for the default behavior being that polygons and lines highlight, but not points?
... View more
02-18-2016
11:28 AM
|
0
|
7
|
776
|
POST
|
Hi Kelly, there's no issue with polygons highlighting - the polygons in my jsfiddle highlight too, it's only the points that seem not to.
... View more
02-17-2016
03:58 PM
|
0
|
1
|
776
|
POST
|
Hi Kelly, I tried this out but unfortunately it doesn't seem to work. Here's a jsfiddle Edit: corrected the missing reference in the jsfiddle
... View more
02-17-2016
03:31 PM
|
0
|
4
|
1119
|
Title | Kudos | Posted |
---|---|---|
1 | 03-09-2016 10:46 AM | |
1 | 01-21-2016 10:04 AM | |
1 | 06-23-2015 10:58 AM | |
1 | 01-19-2016 11:19 AM | |
1 | 08-10-2016 02:06 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|