|
POST
|
Greetings, I am having considerable trouble getting the results from a relationship query to populate an attribute inspector(for editing purposes). I have been working on this for a few weeks now and am having no luck. Takes two clicks before the related info will pop up in a infowindow.
function findRelatedRecords(features) {
var relatedTopsQuery = new esri.tasks.RelationshipQuery();
relatedTopsQuery.outFields = ["*"];
//relatedTopsQuery.relationshipId = 3;
relatedTopsQuery.relationshipId = 0;
//relatedTopsQuery.objectIds = [features[0].attributes.OBJECTID];
relatedTopsQuery.objectIds = [features[0].attributes.OBJECTID];
wellFeatureLayer.queryRelatedFeatures(relatedTopsQuery, function(relatedRecords) {
console.log("related recs: ", relatedRecords);
if ( ! relatedRecords.hasOwnProperty(features[0].attributes.OBJECTID) ) {
console.log("No related records for ObjectID_1: ", features[0].attributes.OBJECTID_1);
return;
}
var fset = relatedRecords[features[0].attributes.OBJECTID];
//var fset = relatedRecords[features[0].attributes.OBJECTID];
items = dojo.map(fset.features, function(feature) {
return feature.attributes;
});
function findWells(evt) {
var asdf = evt.layers[0].layer;
var selectQuery = new Query();
var selectionQuery = new esri.tasks.Query();
var tol = map.extent.getWidth()/map.width * 5;
var x = evt.mapPoint.x;
var y = evt.mapPoint.y;
var queryExtent = new esri.geometry.Extent(x-tol,y-tol,x+tol,y+tol,evt.mapPoint.spatialReference);
selectionQuery.geometry = queryExtent;
asdf.selectFeatures(selectionQuery, FeatureLayer.SELECTION_NEW, function(features) {
//store the current feature
updateFeature = features[0]; console.log("adf");
map.infoWindow.setTitle(features[0].getLayer().name); console.log("adf");
map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)); console.log("adf");
});
};
// I am also unable to get the attribute inspector to pull up a non related feature BELOW
var layerInfos = [{
'featureLayer': wellFeatureLayer1,
'showAttachments': false,
'isEditable': true,
'fieldInfos': [
{'fieldName': 'SERVICE_ID', 'isEditable':true, 'tooltip': 'Current Status', 'label':'Status:'}
]
}];
var attInspector = new AttributeInspector({
layerInfos:layerInfos
}, domConstruct.create("div"));
Any help would be very much appreciated.
... View more
08-13-2014
12:21 PM
|
0
|
13
|
7611
|
|
POST
|
I'm trying to get the attribute inspector to work with multiple layers, but I'm unsure of how to go about the layInfos. var layerInfos = [{ 'featureLayer': petroFieldsFL, 'showAttachments': false, 'isEditable': true, 'fieldInfos': [ {'fieldName': 'SERVICE_ID', 'isEditable':true, 'tooltip': 'Current Status', 'label':'Status:'} ] }]; var attInspector = new AttributeInspector({ layerInfos:layerInfos }, domConstruct.create("div")); Do I need to create an attribute inspector for each layer?
... View more
08-10-2014
11:12 AM
|
0
|
3
|
3645
|
|
POST
|
function findWells(evt) { var selectionQuery = new esri.tasks.Query(); var tol = map.extent.getWidth()/map.width * 5; var x = evt.mapPoint.x; var y = evt.mapPoint.y; var queryExtent = new esri.geometry.Extent(x-tol,y-tol,x+tol,y+tol,evt.mapPoint.spatialReference); selectionQuery.geometry = queryExtent; wellFeatureLayer.selectFeatures(selectionQuery,esri.layers.FeatureLayer.SELECTION_NEW); }; This is what I use to pull points and lines.
... View more
08-08-2014
07:35 AM
|
0
|
1
|
927
|
|
POST
|
Apologize for dubbling up, I didn't see ArcGIS group when I started it. I'll put a big message up on the group, wait a few days and then end the group.(if I can?)
... View more
08-06-2014
08:04 AM
|
0
|
9
|
2298
|
|
POST
|
I've seen examples on the samples page, but I was wondering what the capabilities are. Can I work with a CSV like a feature layer and make edits through the api? Can I run findtasks or perform queries? Just curious.. Thanks
... View more
07-30-2014
12:53 PM
|
0
|
0
|
741
|
|
DOC
|
I can't wait to compare this imagery in 5 years, and yes, the tree cluster went for a swim(a month after this project).
... View more
07-26-2014
10:24 AM
|
1
|
3
|
6580
|
|
DOC
|
Old project back in my school'n days. Still relevant(and surprisingly accurate) based on crop damage from the summer floods.
... View more
07-26-2014
10:21 AM
|
4
|
2
|
4836
|
|
POST
|
Boom goes the dynamite.... var options = { autoComplete:true, arcgisGeocoder:{ url: "Geocode service", } }; var directions = new esri.dijit.Directions({ map: map, geocoderOptions: options },"dir"); directions.startup();
... View more
07-26-2014
09:50 AM
|
0
|
0
|
683
|
|
POST
|
Are you searching for a point by GPS coordinates or just GPS coordinates alone? This example by John Gravois might help. http://johngravois.com/maps/directions-click.html
... View more
07-24-2014
07:10 AM
|
0
|
0
|
828
|
|
POST
|
Related tables gave me hell a few weeks ago. Double tap and make sure your ObjectID field labels are the same in both services. ObectID and ObjectID1 almost made me pull me hair out.
... View more
07-22-2014
12:45 PM
|
0
|
3
|
2938
|
|
POST
|
I have created a address locator that works great in the geocoder, but I need to apply it to the directions widget as well. Tried for a few hours... and I am now stuck. var myGeocoders = [{ // secure service url: locatorUrl, singleLineFieldName: "SingleLine", name: "Enter Name" }]; geocoder = new Geocoder({ map: map, autoComplete: true, arcgisGeocoder: false, geocoders: myGeocoders, value: "" },"search1"); geocoder.startup(); var directions = new Directions({ map: map },"dir"); directions.startup(); I got a little hung up in the documentation and I'm not 100% where to go next. Any help would be appreciated.
... View more
07-22-2014
12:29 PM
|
0
|
1
|
2742
|
|
POST
|
Found the answer after a couple more looks at it. I pulled the var templateLayers = arrayUtils.map(evt.layers, function(result){ return result.layer; out completely. and changed featureLayers: templateLayers, to featureLayers: [layer,layer2,layer3] Tim's filter worked, but I was running too many layers(my best guess) and it was causing a timeout. Cheers.
... View more
07-22-2014
09:14 AM
|
0
|
0
|
584
|
|
POST
|
Ken, Just wondering, could you set a pause to "toggle" between an attribute inspector and a popup?
... View more
07-22-2014
09:08 AM
|
0
|
0
|
1679
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-25-2015 09:25 AM | |
| 1 | 08-26-2015 05:13 AM | |
| 1 | 08-27-2015 08:59 AM | |
| 1 | 04-13-2015 12:06 PM | |
| 1 | 02-03-2015 07:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-05-2023
04:48 PM
|