|
POST
|
Hey everybody, tagging on to this discussion, I had another question. Robert Scheitlin, GISP was able to help me out per usual, but I ran into another problem. I want to use a Multipoint Geometry to select all features in a polygon that intersect with a point from the multipoint geometry. Here is the code I have so far: var myButton2 = new Button({
label: "Analyze",
onClick: function(){
//var selectedCity = [];
//var allPoints = [];
var mp = new Multipoint();
arrayUtils.map(NewLayer.graphics, function(gra){
mp.addPoint(gra.geometry);
//allPoints.push(gra);
});
console.log(mp);
var query = new Query();
//for (var i = 0; i < allPoints.length; i++) {
//query.geometry = allPoints.geometry;
//thisIsaTest = ft6select.selectFeatures(query,FeatureLayer.SELECTION_ADD, function(evt2){
//if(evt2.length > 0){
//var tutu = evt2[0].geometry;
//selectedCity.push(tutu);
//console.log(selectedCity);
//}
//});
//}
console.log(selectedCity);
query.geometry = mp;
ft6select.selectFeatures(query);
}
}, "progButtonNode2").startup();
ft6select.on('selection-complete', function (evt){
console.log(evt);
}); This code returns an empty array, meaning nothing has been selected. When I use the commented out method, using each point of the multipoint geometry, it does select features that intersect with each point. I hope this makes any sense. Tim
... View more
07-20-2015
06:59 AM
|
0
|
7
|
6024
|
|
POST
|
One more question, how do I do step one? I assume this happens here? map.on('layer-add-result', function (evt){
//What code do I need?
});
... View more
07-17-2015
08:29 AM
|
0
|
3
|
3122
|
|
POST
|
That is a great idea, I'll try that. I just wish the javascript API had a similar tool like ArcGIS Desktop "Select by location" Thanks!
... View more
07-17-2015
08:15 AM
|
0
|
0
|
3122
|
|
POST
|
Robert, that might be an idea. Maybe I should have explained what my goal is. I would like the user to be able to add their point featurlayer and see which points would fall within the flood zone. Tim
... View more
07-17-2015
07:45 AM
|
0
|
8
|
3122
|
|
POST
|
Hey everybody, I am looking for a way to select points from a feature layer that fall within this feature layer: Layer: Atl_slr_merged_2ft (ID: 6) It sounds easy enough if you use ArcGIS Desktop but in javascript I am running into issues. Using the method described here would work, union and then use the geometry of the union feature to select what falls within it. But if your feature layer has thousands of polygons, the union would take forever. So my question is, am I approaching this issue wrong? Is my only option to union the layer before publishing it on a server ( which I sadly can't do, because I don't have the feature layer and rely on NOAA hosting it). Any input would be greatly appreciated! Thanks, Tim
... View more
07-17-2015
07:27 AM
|
0
|
11
|
6814
|
|
POST
|
Bjorn Svensson, Just looked at the blogpost and reading through the documentation, it looks all very exciting. One thing I would point out as being important for long time developers is the following: Prior to 4.0, you could use both AMD and legacy modules. Beginning with 4.0, support is only provided for the AMD model. So everybody check this out http://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/ Tim
... View more
07-17-2015
06:14 AM
|
1
|
0
|
2367
|
|
POST
|
Steve, I think you are missing sniff in your function, which throws off the order. define ([ "dojo/_base/array", "dojo/_base/connect", "dojo/_base/declare", "dojo/_base/sniff", "dojo/has", "dojox/widget/Dialog", "dijit/form/Button", "dijit/place", "dojo/domReady!" ], function ( array, connect, declare, sniff, has, Dialog, Button, place ) {
... View more
07-16-2015
09:28 AM
|
1
|
2
|
1620
|
|
POST
|
I think what Robert is talking about is how the datagrid here is populated? ArcGIS API for JavaScript Sandbox
... View more
07-15-2015
01:18 PM
|
2
|
0
|
3308
|
|
POST
|
You can access each attribute like this: results.features[0].attributes.ATTACHLOC Is this what you mean? PS: Just saw you already did this, so disregard
... View more
07-15-2015
12:25 PM
|
2
|
1
|
3594
|
|
DOC
|
Hey Zach, I agree it would be a good addition, I just don't have time to do it at the moment. As Kevin mentioned, try out Jeremies' widget Tim
... View more
07-14-2015
05:16 AM
|
0
|
0
|
18620
|
|
POST
|
Robert, the other thread was in regards to non-commercial use, but thanks for bringing it up since I forgot to mark an answer and just let it hang there. Tim
... View more
07-10-2015
08:06 AM
|
1
|
0
|
2040
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-06-2015 06:58 AM | |
| 1 | 05-04-2016 07:27 AM | |
| 1 | 07-06-2017 08:12 AM | |
| 1 | 10-26-2015 11:51 AM | |
| 1 | 12-12-2014 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|