|
POST
|
If you're just dealing with an extent, I wonder if you could re-assemble it by finding the new xmin, ymin, xmax, and ymax. Just compare the previous and new values and keep the appropriate ones. For example, something kind of like this: var updatedXmin = Math.min(previousXmin, newXmin); var updatedYmin = Math.min(previousYmin, newYmin); var updatedXmax = Math.max(previousXmax, newXmax); var updatedYmax = Math.max(previousYmax, newYmax);
... View more
04-12-2017
01:23 PM
|
2
|
1
|
1313
|
|
POST
|
I'm not sure it this helps, but using the Draw and Edit toolbars seems to allow for this functionality: JS Bin - Draw and Edit Toolbars
... View more
04-12-2017
01:00 PM
|
1
|
3
|
1313
|
|
POST
|
Please note that 'outStatistics' is an array of StatisticDefinition instances, and 'onStatisticField' is the name of a single field. Try something like this: var sumStats_1= new StatisticDefinition();
sumStats_1.statisticType = "sum";
sumStats_1.onStatisticField = "POB_TOT";
sumStats_1.outStatisticFieldName = "Sum_POB_TOT";
var sumStats_2= new StatisticDefinition();
sumStats_2.statisticType = "sum";
sumStats_2.onStatisticField = "EDAD0015";
sumStats_2.outStatisticFieldName = "Sum_EDAD0015";
var sumStats_3= new StatisticDefinition();
sumStats_3.statisticType = "sum";
sumStats_3.onStatisticField = "EDAD1664";
sumStats_3.outStatisticFieldName = "Sum_EDAD1664";
var sumStats_4= new StatisticDefinition();
sumStats_4.statisticType = "sum";
sumStats_4.onStatisticField = "EDAD65_";
sumStats_4.outStatisticFieldName = "Sum_EDAD65_";
var myQuery = new Query();
myQuery.where = "1 = 1";
myQuery.geometry = circle;
myQuery.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
myQuery.outStatistics = [sumStats_1,sumStats_2,sumStats_3,sumStats_4];
var myQueryTask = new QueryTask(_poblacion);
myQueryTask.execute(myQuery).then(...);
... View more
03-29-2017
11:45 AM
|
1
|
4
|
1527
|
|
POST
|
private _onPointerDown(evt:PointerEvent) {
const screenPoint:ScreenPoint = new ScreenPoint({x:evt.x, y:evt.y});
} I believe this should work.
... View more
03-23-2017
01:18 PM
|
1
|
2
|
744
|
|
POST
|
Another common issue happens when the view container is not 100% of the width and height of the body node. In these cases I normally adjust the event screenPoint by the view position: evt.screenPoint.x += view.position[0];
evt.screenPoint.y += view.position[1];
... View more
02-27-2017
09:25 AM
|
1
|
0
|
2169
|
|
POST
|
I'd use the 'containerNode' (not 'domNode'), or create a new node in the 'containerNode'. I set the 'container' property when creating the widget, not after. I don't recall any of the samples using 'esri/widgets/Widgette' (can't even find doc on it) and I've never used it; I've used 'esri/widgets/Widget', just like the samples. I would suggest you start with a very simple widget, or use of of the provided samples, so you can work out the ContentPane/StackContainer issues first.
... View more
02-23-2017
08:34 AM
|
1
|
1
|
1145
|
|
POST
|
Are you using the 'container' property when instantiating your widget? Widget | API Reference | ArcGIS API for JavaScript 4.2 In the app that consumes my widget, I normally create a dom node where I'd like my widget to be located then pass it in as the 'container' property when creating my widget instance, just like any of the other default widgets. If adding to the View.ui, I normally just skip setting the 'container' property altogether. If you need access to the 'real' node, you can use 'afterCreate' in your 'render()' method, something kind of like this: render(){
return (
<div bind={this} class={CSS.base} afterCreate={this._initialze}></div>
);
}
private _initialize(node: Element): void{
/* do something with node here */
} In your case, one of several options is to first create a ContentPane inside of the StackContainer, then create a dom node inside of the ContentPane and pass it into your widget as the 'container' property.
... View more
02-22-2017
10:32 AM
|
1
|
3
|
1145
|
|
POST
|
No need for setInterval(), just watch the property: view.watch("updating", function(updating){ console.info("View Updating: ", updating); }); Accessor | API Reference | ArcGIS API for JavaScript 4.2
... View more
02-07-2017
01:59 PM
|
3
|
0
|
2046
|
|
POST
|
I wonder if watching the 'updating' property gives you what you need? View | API Reference | ArcGIS API for JavaScript 4.2
... View more
02-07-2017
12:38 PM
|
0
|
0
|
2046
|
|
POST
|
Make sure graphic/feature only exists in one layer. If you want to 'move' it to a different layer you should first clone it, and you can use the toJson() method to help in this task. var newGraphic = new Graphic(oldGraphic.toJson());
... View more
12-02-2016
09:18 AM
|
1
|
1
|
1134
|
|
POST
|
The layer should only exist in one map, but the map can have multiple views. Have you tried creating just ONE layer in ONE map, then use that single map for both the MapView and SceneView?
... View more
11-29-2016
11:32 AM
|
1
|
0
|
1127
|
|
POST
|
Here's some code I found: // using put-selector/put to create html node
var formNode = put("form",{"method":"post","enctype":"multipart/form-data"});
var formData = new FormData(formNode);
formData.append("file",arrayBuffer,filename);
... View more
11-15-2016
03:55 PM
|
1
|
1
|
3578
|
|
POST
|
Assuming the file size and type are not the issue as reported by the server error log, is the request using "method":"POST" and "enctype":"multipart/form-data"? When creating a FormData object I normally pass in a html <form> node that has these properties set, but I"m not sure if esriRequest(...) does this for you. Also, when calling esriRequest(), "handleAs" specifies how the response is handled in your client code and not related to what you are sending.
... View more
11-15-2016
02:08 PM
|
0
|
1
|
3578
|
|
POST
|
Check out the doc: CSVLayer | API Reference | ArcGIS API for JavaScript 3.18 Does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries.
... View more
11-15-2016
09:07 AM
|
1
|
1
|
902
|
|
POST
|
I'm not familiar with how this dijit should work, but here's a slightly modified version of your code that seems to work. <!DOCTYPE html>
<html>
<head>
<title>Wizard Test</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.1/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/4.1/dojox/widget/Wizard/Wizard.css">
<style>
#wizard1 {
color : white;
background-color : dodgerblue;
width : 500px;
height : 300px;
}
</style>
<script type="text/javascript">
var dojoConfig = { parseOnLoad: true };
</script>
<script src="https://js.arcgis.com/4.1/"></script>
<script type="text/javascript">
require([
"dojox/widget/Wizard",
"dojox/widget/WizardPane",
"dojo/domReady!"
], function () {
});
</script>
</head>
<body class="claro">
<div id="wizard1" data-dojo-type="dojox/widget/Wizard" data-dojo-props="nextButtonLabel:'Go to next pane...'">
<div data-dojo-type="dojox/widget/WizardPane">
<h1>Tab 1</h1>
</div>
<div data-dojo-type="dojox/widget/WizardPane">
<h1>Tab 2</h1>
</div>
</div>
</body>
</html>
... View more
11-10-2016
08:36 AM
|
1
|
1
|
796
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-07-2024 04:14 PM | |
| 1 | 02-23-2024 12:40 PM | |
| 1 | 03-01-2024 10:48 AM | |
| 2 | 08-03-2023 02:34 PM | |
| 2 | 07-19-2023 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-24-2024
06:01 PM
|