POST
|
I saw this behavior when the scales of the cache don't match if you have several caches. The JS API (unlike Silverlight) see in full extent that there is no scale and it fail to draw. suggestions: 1. Match the scales of the caches. 2. Add a scale that fits the full extent. Maybe I helped... Oren Hi Oren, You might be right. I remember making minor changes to the scales. The reason I did that was because I wasnoticing overlapping labels even though I picked up the scale ranges very carefully. To tide over this issue I made +1 unit of change in couple of my scales. I'll go back and set it right and see if that fixes the issue. Thanks Samir
... View more
06-04-2013
05:31 AM
|
0
|
0
|
552
|
POST
|
Hello, I am trying to implement a dojox grid in my application and I am facing multiple issues. I am using API 3.2 with dojo 1.6. Users can select unit of analysis as 'State' or "District (sub-State)' as unit of analysis. When user selects 'State', all states are displayed, but when user selects 'District', he/she is allowed to select one or multiple states. In both cases my grid is behaving strangely. Some of the issues are: 1. When 'State' is selected, datagrid is populated but shows up only when the headers are clicked. 2. When 'District' is selected, selecting a state and running the function to display these districts meets the same fate as #1. At times it does not show up all and gives an error: Uncaught Error: dojo.data.ItemFileReadStore: Invalid item argument. 3. As the user adds a new state to display districts within the state, the grid now displays only 14 records. This is consistent each time new districts are added. I have also have issues with the CSS of my grid. I did a lot of experimentation but cannot fix the height of my header to my desired height. Also, I am unable to remove the background color of the datagrid rows. Here is my HTML, JS and CSS: HTML: <div id="geogDataTab" data-dojo-type="dijit.layout.ContentPane" title="Map data" >
<div data-dojo-type="dijit.form.Form" id="finGeogData" name="finGeogData">
<table data-dojo-type="dojox.grid.DataGrid" id="grid" rowSelector="20px">
<thead>
<tr>
<th field="geogName" width="60%">
<p>Geography</p>
</th>
<th field="indValue" formatter="formatNumber" width="40%">
<p>Data</p>
</th>
</tr>
</thead>
</table>
</div>
</div> JavaScript: function queryParams(event){
var items = [], data, gridStName, gridDistName, gridIndValue, gridStore;
....
queryTask.execute(query, function(featureSet) {
var features = featureSet.features;
dojo.forEach(features, function(stFeature) {
gridStName = stFeature.attributes.State_name; //'Dist_name' instead of 'State_name' when State is selected
gridIndValue = stFeature.attributes[event.indv];
items.push({
geogName : gridStName,
indValue : gridIndValue
});
});
data = {
identifier : "geogName",
items : items
};
gridStore = new dojo.data.ItemFileWriteStore({
data : data
});
dijit.byId("grid").set("store", gridStore);
});
....
}
CSS: .dojoxGridRowTable {
width: 180px;
}
#grid {
text-align: left; border: 1px dotted black; width:auto; background:none;
}
#grid td{
text:black; background-color:none;
}
#grid .dojoxGridMasterHeader, #grid .dojoxGridHeader, #grid table.dojoxGridRowTable{
height:30px !important; left:0px !important; width: 195px !important;
}
th#gridHdr0.dojoxGridCell.dojoDndItem, th#gridHdr1.dojoxGridCell.dojoDndItem {
margin:0px !important; height:30px !important;
}
#dojox_grid__View_1{
left:0px !important; width:210px !important;overflow-x:hidden;
}
#grid.dojoxGridScrollBox{
width:auto; left:0px;height:auto;
}
.dojoxGridCell th{
left:0px; background-color:none !important; height:30px !important;
}
#grid thead{
height:30px !important;
} I am not sure where the problem lies. Can someone help? Thanks Samir
... View more
06-03-2013
08:36 AM
|
0
|
0
|
1018
|
POST
|
What code are you using to zoom out to the full extent? I am using map.setExtent() function
... View more
06-03-2013
06:03 AM
|
0
|
0
|
552
|
POST
|
Do you have a link to a good walk through on how to set up the proxy by any chance? I used the steps suggested by ESRI which can be accessed here: http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/ags_proxy.html. Make sure that you add the serverUrls in the proxy file as mentioned in this document. I hope this is helpful.
... View more
05-30-2013
08:19 AM
|
0
|
0
|
1378
|
POST
|
Can anyone help please? I resolved my problem by focusing on my proxy page. It turned out that my proxy page was not working. I followed the instructions to set this up and I could see my proxy doing its job.
... View more
05-30-2013
06:02 AM
|
0
|
0
|
1378
|
POST
|
So what happens when you zoom in and out using the mouse wheel or the slider on the top left? Do the tiles display ok. What basemap are you using? are there any errors that appear in the console for your web browser? Yes, using the mouse wheel or the zoom slider refreshes the tiles and the entire map is displayed. I am using ESRI's shaded relief map as the background, and India base map has been created in-house. There are no errors reported in the console. Thanks Samir
... View more
05-30-2013
05:48 AM
|
0
|
0
|
552
|
POST
|
Hi all, My application allows users to select a state of India, and the map zooms to the selected state. Another button helps zoom out the map to its initial extent which is the map of India. As illustrated in the document attached, the zooming out to all of India does not refresh the remaining cache tiles. Can someone suggest a direction to accomplish this? Thanks Samir
... View more
05-29-2013
08:28 AM
|
0
|
6
|
940
|
POST
|
Thanks Steve, It worked for me as well. The next thing I need to do is to sort the html list that is displayed after user selects state(s). Samir
... View more
04-16-2013
08:45 AM
|
0
|
0
|
498
|
POST
|
Hello, I have a data store with names of states queried from a feature layer as shown in this example. Here is my code: //Populate the ComboBox with unique values var stateName; var values = []; var testVals = {}; //Add option to display all district names to the ComboBox values.push({ name : "All India" }); //Loop through the QueryTask results and populate an array //with the unique values var features = results.features; dojo.forEach(features, function(feature) { stateName = feature.attributes.State_name; if (!testVals[stateName]) { testVals[stateName] = true; values.push({ name : stateName }); } }); //Create a ItemFileReadStore and use it for the //ComboBox's data source var dataItems = { identifier : 'name', label : 'name', items : values }; var storeS = new dojo.data.ItemFileReadStore({ data : dataItems }); This data store is attached to a filteringSelect: dijit.byId("selStateM2").set("store", storeS); Before ataching the store to my filteringSelect, I would like to sort the state names in alphabetical order. Here is my code: var sortAttr = [{ attribute : "name", ascending : true }]; storeS.fetch({ query : {}, sort : sortAttr }); I need help in understanding how to push this sorted list to my filteringSelect. Thanks Samir
... View more
04-16-2013
07:00 AM
|
1
|
2
|
3872
|
POST
|
have you seen this? Thanks John, The difference between this example and my code is that in this example the breaks are hardcoded but in my code the breaks are generated dynamically based on the data available. The available data, unfortunately, has some records with '0' value which I would like not be used for creating the breaks. This example from my previous post shows some of the code that I have used. Thanks Samir
... View more
04-09-2013
05:54 PM
|
0
|
0
|
243
|
POST
|
Hi, I am using a ClassBreaksDefinition for my renderer. I have selected the classification field. In my application, some of my geographies have a value of '0' for the classification field, and I would like the renderer to pick breakpoints based on values which are greater than '0'. Can someone point me to a sample that does that, or help me understand how to do this? Thanks Samir
... View more
04-09-2013
12:07 PM
|
0
|
3
|
487
|
POST
|
Hello, I am using ArcGIS 10.1 with Javascript 3.2, and am hosting my application on amazon EC2. I am also using a web adaptor. I had some issues with my local install which I resolved by setting up the proxy page. However, I am not sure how to do that on EC2 instance. I have tried using the following url but it does not work: http://<ElasticIPAddress>//<proxy folder>/proxy.jsp. This returns a n error status of 404. Any thoughts? Thanks Samir
... View more
04-05-2013
07:09 AM
|
0
|
1
|
257
|
POST
|
You may have encountered a bug in ArcGIS Server 10.1 SP1: http://forums.arcgis.com/threads/73456-new-problem-REST-query-10.1-every-other-request-fails-(400-unable-to-complete-oper)?p=256794&viewfull=1#post256794 Thanks all, I figured there was a small piece of code missing in my init function: esriConfig.defaults.io.alwaysUseProxy = true; Once I placed this code, the site started working normally on my local install with no problems, so far (I'll keep my fingers crossed). However, I now have to host it on amazon EC2 and I am not sure what should be the proxyURL on EC2. My path to the file on EC2 is "http://<ElasticIPAddress>/ArcGIS_proxy/proxy.jsp. I have tried a few options but those didn't work. I am using a web adaptor for this instance. I'll post this question on the appropriate forum as well, but wanted to follow up on my question on this forum. Thanks Samir
... View more
04-05-2013
07:00 AM
|
0
|
0
|
1657
|
POST
|
That's because your returnStateAverage function doesn't actually return any value. You only have a return statement in your anonymous function passed to the forEach() method. Furthermore, all the logic following your returnStateAverage call needs to be moved to the result handler of your queryTask.execute call in the returnStateAverage function, since the queryTask.execute method works asynchronously (more formally, it returnes a dojo.Deferred object). The cleanest implementation would probably be to let your returnStateAverage function return a Deferred object. Thanks for your comment, You are right. Each time I tested the returned values from my function, it informed me that it is an object rather than a value. I'll try using the result handler to see if I can return the value. However, I am not clear what you mean by your last statement..."The cleanest...." Samir
... View more
04-05-2013
05:55 AM
|
0
|
0
|
443
|
POST
|
I haven't looked into your entire code sample - in fact I stopped on the 3rd line:
myURL = "subStateURL";
queryTask = new esri.tasks.QueryTask(myURL);
myURL doesn't look like a valid URL for the query task - it should be an ArcGIS Server REST endpoint. Is subStateURL meant to be a variable (not a string)? If that doesn't help, can you step through your code in Firebug and let us know at which point it's failing? Steve Hi Steve, Thanks for looking into it. Actually, I didn't want to put the whole URL as I wanted to keep it flexible for others to try it out with their data and services. I should have taken off the quotes. subStateURL and stateURLare replaced with the actually service url in my code. The point where this code is failing is where I try to get the value for stateAvg using the function "returnStateAverage". stateAvg=returnStateAverage(stateGeography, stateIndicator); I tested the output in the function which returns the state value. Variable stateVal is correct when I write it to the console but it is not returning the value so I can assign it to var stateAvg. Thanks Samir
... View more
04-05-2013
05:21 AM
|
0
|
0
|
443
|
Title | Kudos | Posted |
---|---|---|
1 | 01-30-2013 09:05 AM | |
1 | 04-16-2013 07:00 AM |
Online Status |
Offline
|
Date Last Visited |
07-01-2022
12:12 AM
|