POST
|
The QueryTask returns a deferred object. You need to wait till all the deferred are resolved, by using "dojo/promise/all" on(dom.byId("search1"), "click", function () {
var typesData = [];
var allPromises = [];
for(var j=15;j<17;j++){
var queryTask3 = new QueryTask("http://localhost:6080/arcgis/rest/services/RAEC/MapServer/"+j);
var query3 = new Query();
query.outFields = ["OBJECTID"];
query3.returnGeometry = false;
query3.where = "FeederID='HITAM POW F2'";
var promise = queryTask3.executeForCount(query3,function (count) {
//alert(count);
var b={ field: j, field1: count };
typesData.push(b);
});
allPromises.push(promise);
}
all(allPromises).then(function(){
var grid= new Grid({
columns: {
field: 'Layers', field1: 'Count' }
}, 'grid');
grid.renderArray(typesData);
});
}); Also, I find that you are mixing AMD and legacy styles, that is not a good practice. I have fixed that for you (Query and Query Task).
... View more
04-10-2017
05:46 AM
|
2
|
2
|
560
|
POST
|
Which version of the javascript api are you using. if it is 4.x then, the api does support it and can be accessed through the geometries directly. Here is details for Point Point | API Reference | ArcGIS API for JavaScript 4.3 If you are using 3.X, There is no direct support for you to be able to get the M values. However, you could use the "esri/request" object and query the layer directly from REST service. The ArcGIS Server 10.1 and higher has support to return the Z and M values.
... View more
04-09-2017
02:00 PM
|
1
|
2
|
627
|
POST
|
Hello James, You are not updating the grid variable which is define above below parser.parse(). Instead, you are creating another locale variable named grid inside the showResults function. Either you can do like Robert as mentioned or dont create a new variable like in the original sample. //Create data store and bind to grid.
store = new ItemFileReadStore({
data: data
});
grid = registry.byId("grid");
grid.setStore(store);
... View more
04-05-2017
08:05 AM
|
1
|
1
|
1673
|
POST
|
As explained in another thread by Thomas Solow, this could happen when HitTest fails to return any record and the popup uses a fallback option to use query function to get the result. More details below. https://community.esri.com/message/676156-re-viewhittest-bug-with-multipoint-geometry?commentID=676156#comment-676156
... View more
04-03-2017
12:21 PM
|
0
|
0
|
1208
|
POST
|
I think it just the sandbox which is failing to show the images. If you look at the Live version its working. If you look at the sample, you will see that all the icons are setup through css and the iconClass are defined for each button in HTML like below. <div data-dojo-type="dijit/form/Button" id="zoomin"
data-dojo-props="iconClass:'zoominIcon'">Zoom In</div> If you want to change the icon, you can define you own Icon style css and update the iconClass in the properties.
... View more
04-01-2017
08:34 AM
|
0
|
1
|
482
|
POST
|
Hello Karen, Can you share the part of the code where you create the variable "newAttributes" and "updateAttributes". The error message looks like it is not getting a graphic object passed to the applyEdits method. Can you check if a null or undefined is passed as an array item. Hope this was helpful.
... View more
03-29-2017
08:00 AM
|
2
|
1
|
1109
|
POST
|
createSubclass is dojo way of creating/extending objects and is part of "dojo/_base/declare". Check out the below link about creating objects and inheritance in dojo. There is a section explaining about "createSubclass()" function. dojo/_base/declare — The Dojo Toolkit - Reference Guide
... View more
03-24-2017
07:15 AM
|
1
|
0
|
1324
|
POST
|
While editing/replying you will see a button with 3 dots, it will expand the options. In the "More" menu, select the "Syntax highlighter". Which will open a window, where you can write your codes.
... View more
03-24-2017
06:40 AM
|
1
|
0
|
1331
|
POST
|
I am not sure if you are doing it right. How did you assume you are inheriting WebTileLayer? When you do "Accessor.createSubclass", it will create an class inherited by Accessor and not WebTileLayer. The "declaredClass" is just a property which holds a string name of the class. In my opinion, it is just a property used to check the type of the object/instance, since there is no direct way in JavaScript to check the type of an object. If you wish to extend WebTileLayer, you should be using WebTileLayer.createSubclass
... View more
03-24-2017
06:37 AM
|
1
|
2
|
1324
|
POST
|
You need to add the dojoConfig before you the script tag for js api. like below. <script type="text/javascript">
var dojoConfig = {
paths: { scripts: location.pathname.replace(/\/[^/]+$/, "") + "/scripts" }
};
</script>
<script src="https://js.arcgis.com/4.3/"></script>
<script type="text/javascript">
require(["scripts/MspTiledMapServiceLayer"], function(MspTiledMapServiceLayer) {
new MspTiledMapServiceLayer();
});
</script>
... View more
03-24-2017
05:47 AM
|
2
|
1
|
1331
|
POST
|
For Label Expressions, you can use the Arcade format. In Arcade to get a part of the string we use below expression. var expression = "mid($feature.LABELFIELD, 2, 3)"; here you get the characters from 3 to 5. This link is not for JS api but, contains lot of tip on how to use Arcade.Specify text for labels—ArcGIS Pro | ArcGIS Desktop
... View more
03-23-2017
10:06 AM
|
0
|
0
|
346
|
POST
|
Are you getting any error? Does the "seriveAreaTask" returns polygon results? If it does, then you have the "serviceArea" graphic which has the geometry property. I am not sure what the problem is. Can you explain a bit more?
... View more
03-23-2017
05:50 AM
|
0
|
1
|
438
|
POST
|
You dont need graphicUtils to do that in 4.x. The mapView.goTo method takes Graphic[] as paramter and will zoom to the location of the graphics. MapView | API Reference | ArcGIS API for JavaScript 4.3
... View more
03-20-2017
12:08 PM
|
4
|
0
|
3889
|
POST
|
You would have to use the FeatureLayer.setRenderer to achieve the result. var renderer = new SimpleRenderer(symbol);
featureLayer.setRenderer(renderer); FeatureLayer | API Reference | ArcGIS API for JavaScript 3.20
... View more
03-19-2017
09:48 AM
|
1
|
0
|
279
|
POST
|
You need to use the instance of MapView to add listener for the event like below. mapView.on("pointer-down",() => this._onPointerDown());
... View more
03-17-2017
09:12 PM
|
1
|
1
|
608
|
Title | Kudos | Posted |
---|---|---|
1 | 03-24-2017 07:15 AM | |
1 | 09-13-2016 06:27 AM | |
1 | 05-21-2015 08:06 AM | |
1 | 12-16-2015 05:43 AM | |
1 | 07-20-2015 09:33 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|