POST
|
At the moment I've been able to build a work around using the properties of the relationship object under the Feature layer to get the Layer Name, and Key Field. Since the key field has the same name in both feature classes and the related layer has been also added as a feature layer I can find it through the map object and run the query function on that layer using the key field. It isn't as awesome, and it has the holes of requiring the key fields to be the same and layers in the map. At least it doesn't require a config file to map between the two layers. It'd still be great if someone could confirm they also see this bug or that theirs works fine. The key to the bug is that it accepts the gdbVersion parameter, but doesn't honor it going instead to the version configured in the feature service.
... View more
10-30-2015
05:22 AM
|
0
|
0
|
267
|
POST
|
I have a feature services published with a point layer and a table. They are related via a primary/foreign key and have an established relationship class. The feature service is published pointing to version A which is one level under Default. Version B is under version A. Default -> A -> B I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table. I have some records returned as expected. I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = A. I have some records returned, same result as no gdbVersion. I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = B. I have the same records returned as if I did not use the gdbVersion option or handed it version A. I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = C (which doesn't exist). No records are returned and an error message is presented. Is anyone able to confirm this behavior or if a bug exists? I am using ArcGIS Server 10.21 on Windows. Thanks.
... View more
10-27-2015
11:04 AM
|
0
|
1
|
2463
|
POST
|
Got it. Had to modify the properties of the delete button rather than my button using the method you suggested. Looks like this now: Uses: this.editor.attributeInspector._hideNavButtons = 0;
var relatedRecordsButton = new Button({ label: "Get Related", "class": "saveButton" },domConstruct.create("div"));
relatedRecordsButton.on("click", getRelated);
domConstruct.place(relatedRecordsButton.domNode, this.editor.attributeInspector.deleteBtn.domNode, "after");
var theDeleteBtn = this.editor.attributeInspector.deleteBtn;
domStyle.set(theDeleteBtn.domNode, "float", "none");
domStyle.set(theDeleteBtn.domNode, "width", "auto");
domStyle.set(theDeleteBtn.domNode, "height", "auto");
... View more
10-21-2015
07:36 AM
|
2
|
0
|
292
|
POST
|
I've got an issue with the placing of a new custom button next to the Delete button on the attribute inspector and could use a hand in figuring out how to have it line up correctly. I'm using the example at Using the attribute inspector | ArcGIS API for JavaScript to modify the existing Attribute Inspector in the Editor found in the Web Application Template. My code looks like var relatedRecordsButton = new Button({ label: "Get Related", "class": "saveButton" },domConstruct.create("div")); relatedRecordsButton.on("click", getRelated); domConstruct.place(relatedRecordsButton.domNode, this.editor.attributeInspector.deleteBtn.domNode, "after"); The result looks like: With the new custom button overlapping the delete button. Does anyone have any suggestions to solve this?
... View more
10-20-2015
10:34 AM
|
1
|
2
|
2473
|
POST
|
That's a silly thing not to include in the inbox... The widget is frustratingly close. If I configure it as totally off panel it works great, as in if it floats on the map like the coordinate widget or scale bar. If I try to put it into the toolbar or dart controller widget it doesn't give me what I'm looking for. I get the widget icon which I can click, it then creates the button I can click to get the message. I haven't been able to get it to have the widget fire the contents of the onclick when I click the icon in the toolbar. It may be a theme specific issue. I pursued the theme editing a bit, while possible it'd be easier to just recode the ability to expose links properly like other themes.
... View more
09-10-2015
01:04 PM
|
0
|
1
|
580
|
POST
|
Ricky, it's not a lot more clicking although I'm hoping to avoid two clicks and want it to operate like the links do in the other templates. Robert, Do you have the link to the template you mentioned? That sounds like something I can pull apart into what I'm looking for.
... View more
09-10-2015
07:50 AM
|
0
|
3
|
580
|
POST
|
Has anyone started a hyperlink widget for the JavaScript WAB? I want to link to a webpage specifically for help documentation. The template I'm using doesn't have a spot for links (Dart Template) and I thought "how hard can it be", rather than modify the template a tool in the toolbar that simply opens a link would be handy. I've got something semi working, it opens a hyperlink and is a out of panel widget. It has some quirks though and I don't really like it, harder than I thought. What I really want is something like the "Home" button, except it opens a link instead of interacting with the map or opening a panel. Is this a terrible plan or does someone have a suggestion of a sample I could visit to get the behavior I'm looking for. Thanks
... View more
09-10-2015
06:30 AM
|
0
|
10
|
3488
|
POST
|
While looking to do this I ended up on this thread, in the spirit of more information for the next person... In the the latest web app builder at the time of this post I added to my config.json the code below which gets dealt with within the api "somewhere". lods is in MapOptions at the same level as the extent. "mapOptions": {
"extent": {
"xmin": -1,
"ymin": -1,
"xmax": -1,
"ymax": 1,
"spatialReference": {
"wkid": 102100
}
},
"lods" : [
{ "level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555 },
{ "level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777 },
{ "level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889 },
{ "level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944 },
{ "level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472 },
{ "level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236 },
{ "level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618 },
{ "level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309 },
{ "level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155 },
{ "level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577 },
{ "level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289 },
{ "level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144 },
{ "level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572 },
{ "level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286 },
{ "level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643 },
{ "level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822 },
{ "level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411 },
{ "level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705 },
{ "level" : 18, "resolution" : 0.597164283559817, "scale" : 2256.994353 },
{ "level" : 19, "resolution" : 0.298582141647617, "scale" : 1128.497176 },
{ "level" : 20, "resolution": 0.14929107082380833, "scale": 564.248588 },
{ "level" : 21, "resolution": 0.074645535411904245, "scale": 282.124294 },
{ "level" : 22, "resolution": 0.0373227677059521225, "scale": 141.062147 }
]
},
... View more
09-03-2015
01:44 PM
|
4
|
5
|
1290
|
POST
|
I've configured Editor Tracking with several feature classes in ArcSDE (Oracle). I've published services with those feature classes and enabled Integrated Windows Authentication in IIS and am using users from Active Directory with Roles in ArcGIS Server. Editor Tracking works great EXCEPT: for legacy reasons (decisions made years ago) I would like to only log the username and not the domain\username into the Editor Tracking Fields. Is it possible to configure this without cracking out code? I'd like to continue to take advantage of the Editor Tracking configuration dialog and the way the Attribute Inspector deals with those fields in the Web App Builder. If it isn't possible can I still leave editor tracking configured, but override it's handling in an Object Class Extension? I already have one in place on these features, but am trying to avoid putting this functionality in it to keep the out of the box handling in other applications.
... View more
09-03-2015
11:53 AM
|
1
|
0
|
2041
|
POST
|
Followup and potentially more straight forward question. Does the fact that I'm editing a feature (selected it and popped open the attribute inspector) cause the viewer to somehow prevent other layers from being queried or events from firing? I'm using the edit widget with web app builder 1.2 It appears that while I'm editing a line feature and zoom out while the line is selected and attribute inspector is open only the line feature redraws, only the already requested data for background maps and other dynamic layers is displayed.
... View more
09-03-2015
11:23 AM
|
0
|
0
|
207
|
POST
|
I'm continuing working on enhancements on the edit widget. I've built an Object Class Extension to generate a uniqueID and populate a field based on some rules, I've deployed it and it works well. When you make an edit to one of five fields the values of those fields are combined to populate a sixth field in the object class extension. When I make an edit to one of those five fields the applyEdits function fires and sends the update (updating all fields?). The class extension fires and fills in the sixth field. The attribute inspector doesn't know this happens and doesn't reflect the result for the sixth field. I'm working on how to update the attribute inspector on an event and feel close. I've hooked onto some events that fire which I'd expect to update the features in the feature layer and then refresh the inspector, I'm not getting the result I want. I see query requests being sent to the feature service, but the graphics layer isn't reflecting the change and therefore the attribute inspector isn't showing it either. My hooks onto the query events aren't firing at this time. I think the inspector is refreshing and just reshowing the same values it already had. When I pan the map all the query events I've hooked onto fire appropriately, reopening the attribute inspector shows what I've been looking for. Any thoughts would be appreciated... It almost seems like the api is preventing the other events from firing during an edit process. ------------------------------------------------------------------ onOpen function from my Edit Widget, creates some hooks onto the feature layers if the specified event happens onOpen: function() {
if (typeof this.hasAlreadyHitchedLayerChanges === "undefined") {
featureLayerCount = this.map.graphicsLayerIds.length;
for(i = 0; i < featureLayerCount; i++){
var layerID = this.map.graphicsLayerIds;
var fLayer = this.map.getLayer(layerID);
if(fLayer !== undefined) {
fLayer.on("edits-complete", OnEditsCompleteHandler);//OnEditsCompleteHandler
fLayer.on("query-features-complete", OnQueryFeaturesComplete);
fLayer.on("query-extent-complete", OnQueryFeaturesComplete);
fLayer.on("query-ids-complete", OnQueryFeaturesComplete);
fLayer.on("update", OnQueryFeaturesComplete);
}
}
this.hasAlreadyHitchedLayerChanges = true;
}
} ----------------------------------------------------------------------- The two functions that fire when the events are detected. function OnEditsCompleteHandler(evt){
//alert("it worked! Here's the data: " + evt);
//console.log(this.editor);
require(['jimu/WidgetManager'],function(WidgetManager){
var wm = WidgetManager.getInstance();
var editWidget = wm.getWidgetsByName('Edit')[0];
console.log(evt);
console.log(editWidget);
var theLayerInfos = editWidget.editor.attributeInspector.layerInfos;
for (var i=0; i<theLayerInfos.length; i++) {
var theLayerID = theLayerInfos.layerId;
console.log(this.map);
var theLayerToRefresh = editWidget.map.getLayer(theLayerID);
theLayerToRefresh.refresh(); //seems to cause requests to the feature service that aren't reflected in the map?
theLayerToRefresh.redraw(); //probably unnecessary
editWidget.attributeInspector.refresh(); //not showing my updated data
}
});
};
function OnQueryFeaturesComplete(evt) {
alert("it worked! Here's the data: " + evt);
... View more
09-02-2015
12:31 PM
|
0
|
1
|
2671
|
POST
|
This particular situation I don't have ArcFM. This is a new custom class extension that populates an attribute with some custom code depending on various things, similar to an ArcFM autoupdater. I found a good ArcGIS sample based on your option two which worked perfectly. It now gets guid and name from the TYPE object of the objectCategory and populates them into the domain used by the tool's input parameter. Now if new classes are added in the future they won't be hardcoded in the tool. IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass(); //pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 1"); //pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 2"); // Set up GUID object for the desired component category ESRI.ArcGIS.esriSystem.IUID uid = new ESRI.ArcGIS.esriSystem.UIDClass(); uid.Value = "{D4E2A322-5D59-11D2-89FD-006097AFF44E}"; //GUID of the Class Extension Category ESRI.ArcGIS.esriSystem.ICategoryFactory categoryFactory = new ESRI.ArcGIS.esriSystem.CategoryFactoryClass(); categoryFactory.CategoryID = (ESRI.ArcGIS.esriSystem.UID)uid; object object_Category = categoryFactory.CreateNext(); while (object_Category != null) { Type theType = object_Category.GetType(); pGUIDDomain.AddStringCode("{"+theType.GUID.ToString()+"}", theType.Name.ToString()); object_Category = categoryFactory.CreateNext(); }
... View more
07-30-2015
08:13 AM
|
1
|
0
|
679
|
POST
|
I'm building a geoprocessing tool which allows Class Extensions to be applied to and removed from an object in the geodatabase. Works great, it's in a custom toolbox with user defined input parameters. If I know the guid of a class extension I can apply it. Exert from set execute function ITable theITable = _utils.OpenTableFromString(thePath);
IClassSchemaEdit classSchemaEdit = (IClassSchemaEdit)theITable;
if (classSchemaEdit == null)
{
message.AddMessage("The selected object does not contain and/or support extension classes.");
}
else
{
message.AddMessage("The extension class is being set on the selected object");
ISchemaLock schemaLock = (ISchemaLock)classSchemaEdit;
//Need an exclusive schema lock on the class.
schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);
classSchemaEdit.AlterClassExtensionCLSID(theGUIDUID, null);
schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);
} Exert from ParameterInfo section of tool. //Could write some code here to pull this list of codes from the geodatabase
IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass();
pGUIDDomain.AddStringCode("{A GUID GOES HERE}", "Test Class 1");
//pAccumulatorsDomain.AddStringCode("Meters", "Meters");
IGPParameterEdit3 theInputGUID = new GPParameterClass();
theInputGUID.DataType = new GPStringType();
theInputGUID.Value = new GPStringClass();
theInputGUID.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;
theInputGUID.DisplayName = "Input GUID";
theInputGUID.Name = "inputGUID";
theInputGUID.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
theInputGUID.Domain = (IGPDomain)pGUIDDomain;
parameters.Add(theInputGUID); In there future rather than have the guids hardcoded or in a config file I'd like to find the class extensions that I could apply in the code that I can then populate into a user pick list in the tool. I don't know how to find the list of extensions. I'd rather get a list of class extensions on the PC rather than applied in the geodatabase. Narrowing the list to custom ones would be ideal but not necessary. It isn't meant to be run by generic users, only administrators. Thoughts?
... View more
07-29-2015
10:01 AM
|
0
|
3
|
3535
|
POST
|
This seems to be a function often missing from first releases of templates. Has anyone started to tackle this issue and make something? It'd be great if this edit widget were able to function the same as the flex widget. There appears to be lots of resistance to new flex viewer deployments, but if you want to do this thing (editing related) there isn't a great alternative.
... View more
07-13-2015
06:10 AM
|
1
|
4
|
3265
|
POST
|
Hmm, somewhere I've got a keyboard operator error then. I'll give it another shot and see what I can make happen.
... View more
07-13-2015
06:05 AM
|
0
|
0
|
582
|
Title | Kudos | Posted |
---|---|---|
1 | 02-04-2019 09:22 AM | |
1 | 07-10-2015 01:01 PM | |
1 | 06-22-2016 07:12 AM | |
1 | 01-25-2019 10:04 AM | |
1 | 01-29-2019 01:43 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|