|
POST
|
See the Graphic.toJson function. Hi, I am using ArcGIS Server 10.1 with JavaScript 3.2. I am running a query on a feature layer and the output is a JavaScript array. I would like the output to be in JSON. I have tried using JSON.stringify(), but the output does not match with the output I get using REST endpoint. Here is my code: var queryA = new esri.tasks.Query();
queryA.where = myGeogString; //myGeogString declared earlier and has a multiple query string ("State_name"='xyz' OR "State_name"='abc' .....)
queryA.returnGeometry = false;
queryA.outFields = ["*"];
var results;
queryTask.execute(queryA, function(featureSet) {
var attr = [], items = [];
for ( i = 0, il = featureSet.features.length; i < il; i++) {
var features = featureSet.features;
var fattributes = features.attributes;
results = [];
for (att in fattributes) {
for ( k = valueB.length; k > -1; k--) { //length of array of indicators for each feature in myGeogString
if (att == valOutB ) {
var myInd = valueB ;
var myAttr = fattributes[att];
results.push(myInd + ":" + myAttr);
}
}
}
items.push("location:"+featureSet.features.attributes.State_name + "," + results);
}
var itemsJson = JSON.stringify({locations:items});
alert(itemsJson);
}); Is it possible to convert this output to JSON so it matches with REST output? Thanks Samir
... View more
02-22-2013
11:15 AM
|
0
|
0
|
1017
|
|
POST
|
I have created a sample that demonstrates the bug. When the page opens, it will be zoomed to the extent of WA. Select the WSDOT Basemap from the Basemap Gallery. When you do this, the wrong tiles are used. If you switch to one of the other basemaps, the map displays properly again.
... View more
02-21-2013
09:22 AM
|
0
|
0
|
856
|
|
POST
|
Hi Jim, I've encountered some problems with setting the 'open' parameter to false. The dijit/TitlePane would still open. Instead, I've had to use '0'. Ex: Did not work: <div id="titlePane" data-dojo-type="dijit.TitlePane" data-dojo-props="title:'Measurement', open:'false'"> Worked: <div id="titlePane" data-dojo-type="dijit.TitlePane" data-dojo-props="title:'Measurement', open:0"> Have you tried removing the single quotes around 'false'? I don't have any experience with this dijit, but when JavaScript converts the string 'false' to a boolean it becomes true.
... View more
02-13-2013
08:37 AM
|
1
|
0
|
1866
|
|
POST
|
It looks like IE9 was the first version of IE to support HTML5 <canvas> element.
... View more
02-11-2013
08:49 AM
|
0
|
0
|
1164
|
|
POST
|
When I pasted your code into jsfiddle it seemed to work just fine. The What's new in 3.3 document describes what is required to set up auto-resize. It looks like the auto-resize option is actually enabled by default, so you do not have to explicitly set that option in your esri.Map constructor.
... View more
02-08-2013
09:47 AM
|
0
|
0
|
512
|
|
POST
|
This question has been asked in a few other threads on this forum, but no good answers have been provided as far as I know. The problem is that HTML 5's local storage limits the amount of data you can store for a web site, and this limit is too small to store very many map tiles.
... View more
01-30-2013
10:56 AM
|
0
|
0
|
805
|
|
POST
|
Have you tried this? [HTML]<meta http-equiv="X-UA-Compatible" content="IE=9" />[/HTML] (I don't have IE 10 so I don't know if that will actually work.)
... View more
01-28-2013
08:53 AM
|
0
|
0
|
908
|
|
POST
|
Dear All, I would like to conver map coordinates (-103.5234,48.56781) to DMS(Degrees Minutes Sec). My map is in WKI:4269. Can anybody help me how to do it in JSAPI. Thanks, Uday I've written code to perform the conversion the other way (DMS to DD). I did a search and found a lot of samples for doing the conversion from DD to DMS. This one looks promising.
... View more
01-28-2013
08:50 AM
|
0
|
0
|
809
|
|
POST
|
I think you have to use dojo.connect for the map event handling.
... View more
01-23-2013
11:55 AM
|
0
|
0
|
1691
|
|
POST
|
Found the solution. Apparently you have to set the html and body to 100% height in CSS (doesn't seem to be the case in a 'standalone' HTML page) Site.css
html,body { height: 100%; margin: 0px; padding: 0px; }
Actually, you do need to do this with a standalone HTML page.
... View more
01-17-2013
10:53 AM
|
0
|
0
|
675
|
|
POST
|
This is something that I believe needs better documentation - I just tried to find a link to send to you, but I can't see where it's documented. You need to host the sample within a web server before it'll work - the Esri API won't work if you're trying to view an HTML file which is stored in a normal directory/folder. If you have access to a web server you can FTP the file onto it and run it there. If you don't have access to a web server, you can set up a local web server on your computer and access it via http://localhost Try searching for "how to set up a local web server" in Google for instructions on how to do this (it varies between Mac and PC). Good luck, Steve You should be able to run your page from Aptana and get it to work properly.
... View more
01-16-2013
01:18 PM
|
0
|
0
|
1494
|
|
POST
|
The ArcGIS JavaScript API has a method for doing this conversion.
... View more
01-14-2013
03:03 PM
|
0
|
0
|
2606
|
|
POST
|
Based on the error message it looks like you are trying to load "jquery" as a module. As far as I know there is no "jquery" module built in to the ArcGIS JavaScript API.
... View more
01-11-2013
11:51 AM
|
0
|
0
|
6095
|
|
POST
|
This thread should be moved to the ArcGIS 10.1 for Server General forum since the cause of your problem is not related to the JS API. It sounds like the connection to the database (where the Python script is writing to) needs to be registered with ArcGIS Server. (Your server admin person would do this.)
... View more
01-11-2013
11:45 AM
|
0
|
0
|
609
|
|
POST
|
Hi all I adapted this script to my applciation and when it loads the Standard Style Internet Explorer shows the following error message: "A script on this page is causing your browser to run slowly ...." [ATTACH=CONFIG]20656[/ATTACH] http://gmaps-utility-gis.googlecode.com/svn-history/r354/trunk/agsjs/examples/toc.html IE does not run JavaScript as fast as other browsers such as Chrome and Firefox. This is especially true of the IE version older than version 9. Which version of IE are you using?
... View more
01-11-2013
07:21 AM
|
0
|
0
|
1412
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2025 08:56 AM | |
| 2 | 03-05-2024 05:10 PM | |
| 1 | 04-30-2013 08:23 AM | |
| 1 | 05-03-2022 09:45 AM | |
| 1 | 06-30-2015 10:55 AM |