POST
|
You have a problem with your if statement. if (newstate = "on") { ... } else { ... } When you check if newstate="on", your actually assigning "on" to newstate and checking if the assignment was successful. Just change it to if (newstate === "on") and you should be fine.
... View more
06-23-2016
01:46 PM
|
0
|
0
|
404
|
POST
|
Hi, Is there a relatively simple way to determine what the level, row , and column are for the current extent? I know level is easy, map.getLevel(), but I am not sure how to determine what the row's and column's are currently on the map so I can request the correct tiles. If I extend the TiledMapServiceLayer, I can use the getTileUrl function, but it renders images in a div and I need to render to a canvas element. Just some background on what I am looking at doing. I have a html canvas element I would like to render images onto. These images are stood up in a s3 bucket in a tiled format( http://....../{z}/{x}/{y}.png). I have created a custom layer that places a canvas element on the map, but I would like to know which tile to request so I can add it to the canvas. I need to do some advanced filtering and read the image data from canvas so I cannot use a simple WebTiledLayer.
... View more
06-23-2016
10:59 AM
|
0
|
0
|
1027
|
POST
|
Thanks anyway. I just found the ArcGIS Online space and am thinking I should have actually posted this over there since this is more a question about configurations through an ArcGIS Online Custom template, I may start a new thread over there and link this one.
... View more
05-26-2016
07:58 AM
|
1
|
0
|
608
|
POST
|
Thanks for the reply Robert. We are actually not trying to use two Web Maps with the same map object, just allow the user to configure two of them in the application template. Our application supports multiple languages and what we are trying to do is have the user create two Web Maps, one in English and one in an alternate language. Then we load the default web map and when they toggle languages, we destroy that map and create another one with the other web map id. This part actually works really well, the part we are having troubles with is ArcGIS Online allowing multiple web maps to be configured through ArcGIS online using the Web Map Dialog picker. This way our users do not have to download the codebase and configure it manually themselves. P.S. Parsing the operational layers works pretty well, we are doing that to create a custom TOC widget to control the layers from the web map plus some defaults that we added, and when we change web map id's, we just re-render the TOC (it's a React component), and it works perfectly with the new web map.
... View more
05-26-2016
07:35 AM
|
0
|
2
|
608
|
POST
|
UPDATE: A workaround we are considering but hoping to avoid is using a string and having the user manually enter their Web Map id as a string. This would work but would not be as nice as using the Web Map dialog.
... View more
05-26-2016
07:15 AM
|
0
|
0
|
608
|
POST
|
Check out this link here, Create app templates—ArcGIS Online Help | ArcGIS , it will point you to a sample github application that can be configured through ArcGIS online. There are also some other links in the local navigation menu on the left for what configurations can be used and how.
... View more
05-26-2016
07:13 AM
|
0
|
0
|
352
|
POST
|
Hi, I have built a custom app template with a bunch of configuration parameters and was wondering if we could use the Web Map Dialog to choose multiple web maps. According to Add configurable parameters to templates—ArcGIS Online Help | ArcGIS, we can add a {
"type": "webmap"
} to our configuration file and the user gets a nice dialog to choose their Web Map, and this works great, but is there a way we could use this to select multiple Web Maps? I was hoping something like this would work but we are not having much luck. {
"type": "webmap",
"fieldName": "webmap"
}, {
"type": "webmap",
"fieldName": "alternateWebmap"
} It seems like when I use the second web map dialog, it just sets the first web map and never allows me to set the second one.
... View more
05-26-2016
07:01 AM
|
0
|
5
|
1426
|
POST
|
If you look in the chrome developer tools network tab, what do you see under form data. It looks like you may not have the right format for form data. I think it should be an object not an array, something like this: data = {
f: 'json',
adds: [{
attributes: {
"user": "",
"objectid: "" // This may be necessary for it to know what feature to update
}
}]
}; And then use this in your AJAX request instead of arrayOfAttributes jQuery.ajax({
... // Your stuff here
data: data
}); That error means the service could not infer what you are trying to do meaning it did not see the 'adds' key in your post data.
... View more
04-14-2016
09:04 AM
|
0
|
1
|
1527
|
POST
|
Eve Lundsten I have put up a sample boilerplate that I have used before in production apps. It demonstrates how to setup babel (to compile ES6 and JSX to ES5 in AMD format) and use React + Flux in a ArcGIS based application. It may be a little tough for beginners but would be a good exercise since it uses React & Flux plus a whole bunch of tools for developing, deploying, and optimizing. The master branch uses the 4.0beta3 api as well but it has tags to versions 3.15 and 3.16. You can check it out here GitHub - Robert-W/esri-flux-react: Simple Boilerplate for using React and Esri's JavaScript API together. It supports IE… and feel free to submit questions/comments as an issue, I generally respond there quicker then here.
... View more
04-13-2016
09:04 AM
|
1
|
0
|
550
|
POST
|
I am having trouble with the Geoprocessor.submitJob function not triggering the error callback when there is an error, instead it throws a TypeError. I am attaching a screenshot of the issue. Currently we are using a service proxy to access a service and it occasionally throws errors regarding Invalid Parameters (we opened a ticket with Esri Customer Support on this and they said it was a known bug with those proxies), however, when this happens or when there is an error with the submitJob, I would like to be able to catch it so I can show my users a nice error message, but currently it is not triggering anything I can catch, in either the status callback or the error callback. Below is the snippet I am using for the submitJob call. geoprocessor.submitJob(params, function (result) {
// calls geoprocessor.getResultData here when this works
}, function (status) {
console.debug(status);
}, function (error) {
console.log('Something Happened', error);
}); This works most of the time, the problem is that when it fails, it does not trigger the error callback at all or even the status callback, just throws TypeError d is not function. Note: I am using 3.15, tried 3.14 and got the same results although I don't remember having this issue in the past.
... View more
12-29-2015
09:24 AM
|
0
|
0
|
2430
|
POST
|
Hi Tracy, I don't believe 'on' is a deferred type which means the .then function won't exist. dojo's on module takes an event name and a callback function. You may be able to move that code in the then into the callback function like below: app.staffLayer.on( 'query-features-complete', lang.hitch(this, function(response){ //there are never any features found here
var feature;
var features = response.features;
var inBuffer = [];
//started with extent,now filter out features that are not actually within buffer
for (var i = 0; i < features.length; i++) {
feature = features;
if (circle.contains(feature.geometry)) {
inBuffer.push(feature.attributes[ESRI_OID]);
}
}
var query = new Query();
query.objectIds = inBuffer;
var staffList = [];
app.staffLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function(results){
arrayUtils.forEach(results, function(feature){
staffList.push(feature.attributes.Contact_FirstName + " " + feature.attributes.Contact_LastName + "</br>");
});
alert("Staff near selected server: " + staffList);
});
})); EDIT: Just noticed @thejus replied while I was typing, but we essentially are saying the same thing
... View more
09-02-2015
08:47 AM
|
0
|
0
|
414
|
POST
|
This partially depends on how the data is stored in the service. For an esriFieldTypeDate. We have used the following to some success, this was from a filter that said show everything in the last 48 hours. ACQ_DATE > date '2015-08-28 15:19:35' However since you want to show things in between two dates, you could use something like this: startDate > date '2015-08-28 15:19:35' and endDate < date '2015-08-31 15:19:35'; The date strings (eg. '2015-08-28 15:19:35') were formatted using JavaScripts Date class in my case, but they are getting sent in as strings so you can construct them in whatever manner is most appropriate for your application. Hope this helps.
... View more
08-31-2015
12:26 PM
|
1
|
2
|
1281
|
POST
|
Yea thats exactly right. Thats pretty much what we did the last time we used their proxy. I think all browsers now support CORS except for IE < 10 and most services now have the Access-Control-Allow-Origin header set to "*", so maybe in the near future we wont really need proxies except for very large GET requests, which proxies convert to POST so they can work.
... View more
08-28-2015
11:52 AM
|
0
|
1
|
957
|
POST
|
Ahh ok, maybe I misunderstood the question. Im not sure if this is what you were looking for but this is a nice way to get a reference to the node so you can get or set its value or just hold on to the node without needing to use document.getElementById. The event that gets passed in has an event.target property which is actually the dom node, ownerAddress.
... View more
08-28-2015
11:48 AM
|
2
|
0
|
568
|
POST
|
Tracy Schloss: Or am I telling the GIS server to only allows requests from the application server? I think this is correct. allowedReferers is who can make the request and serverUrls is where the request can go. So in this case I think you would want allowedReferers to be appserver.com and you would put gisserver.com in your serverUrls configuration. This way the proxy will only allow appserver.com to make requests to gisserver.com and nothing else. In case you haven't seen this, I find this to be a decent resource for what some of the configurations are and how to set them up. resource-proxy/PHP at master · Esri/resource-proxy · GitHub
... View more
08-28-2015
11:38 AM
|
0
|
4
|
957
|
Title | Kudos | Posted |
---|---|---|
1 | 01-08-2015 01:10 PM | |
1 | 08-28-2015 08:59 AM | |
1 | 08-11-2015 08:52 AM | |
1 | 08-31-2015 12:26 PM | |
1 | 04-13-2016 09:04 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|