|
POST
|
Yeah. I hear ya. I figured that was the next step. I was just hoping someone had an idea on what it could possibly be before I do that next step, as that can be quite tedious. I'll post the answer when I figure it out. Thanks.
... View more
06-08-2018
11:46 AM
|
0
|
0
|
2016
|
|
POST
|
Nope. I'm sure. I just single click my vertices. Then double-click to end the line. One other thing I should note is that I have several widgets using this tool. In addition, I use the DrawBox tool in several instances in a single widget (ie., this.drawBox2, this.drawBoxSelect, and this.drawBoxPnt2Pnt are in the same widget). I am careful to deactivate the one that's not being used when the other one is activated. It kind of feels like the problem is a timing thing. I'm just not sure what to do to fix it.
... View more
06-08-2018
11:32 AM
|
0
|
4
|
2016
|
|
POST
|
I'm having an occasional issue when I use the Polyline tool to draw a line. On occasion, when I double-click to finish the line, the last line section (since last vertex drawn) disappears. Has anyone run into this issue before? I do have snapping turned on when I draw a line, so I'm wondering if the snapping might be interfering with it. Thoughts on how to resolve this issue?
... View more
06-08-2018
10:59 AM
|
0
|
6
|
2143
|
|
POST
|
Definitely check it out using the Rest endpoint to see how it should work. I do my graphic creation slightly different: var graphic = new Graphic( point, this._projectPointsLayer.layerObject.symbol, null, this._projectPointsLayer.layerObject.infoTemplate ); Afterwards I set my attributes. Something like the following: attribute[curFld.fieldName] = parseFloat(geom.y).toFixed(curFld.numDecimalPlaces) Then, I do something like the following: graphic.setAttributes(attribute); And finally: lyr.applyEdits([graphic], null, null, lang.hitch(this, this._onApplyEditsFinish, lyr.type), lang.hitch(this, this._onError, lyr.type));
... View more
11-21-2017
08:58 AM
|
1
|
0
|
2380
|
|
POST
|
Hello: I'm looking at using Xamarin for building both IOS and Android native apps. I would like to be able to read and query map services as well as JSON files, and Identify results in a tabular format. But more importantly, I would like to be able to pull much of the data offline for support in "offline mode" (may app will be used in the wilderness areas). I'm trying to get a feel for how much of my code can be used to support both IOS and Android applications vs. the amount of code I would need to rewrite to support IOS and Android differences. Is 20% reasonable? I would also like to get a feel for how many folks out there have done this using Xamarin, and how successful this has been? Is this technology ready for "primetime"? Thanks for your help.
... View more
06-07-2017
07:01 PM
|
0
|
0
|
942
|
|
POST
|
Thanks Thejus: For the case where I insert new table records, every once in a while, I do get an 'undefined' attribute which is sending the same error message. Since it only happens like 2% of the time, it's hard to put my finger on the problem. I'm guessing a problem with my asynchronous calls. I'll look at this some more regarding my update attributes as well. Thanks.
... View more
03-29-2017
08:22 AM
|
0
|
0
|
452
|
|
POST
|
Thanks Saroj. I'll try that. But based on my previous comment, it seems like I have to include the OBJECTID as well (otherwise, I get that error I noted in my previous post).
... View more
03-29-2017
07:47 AM
|
0
|
0
|
2426
|
|
POST
|
I tried by removing the OBJECTID field, as well as any other fields I'm not changing. I get the following error (see below): I also checked and my Feature Service has OBJECTID set as follows: OBJECTID (type: esriFieldTypeOID, alias: OBJECTID, SQL Type: sqlTypeOther, length: 0, nullable: false, editable: false) Error: Must declare the scalar variable "@OBJECTID". at Object.constructor (https://js.arcgis.com/3.19/init.js:2035:385) at new <anonymous> (https://js.arcgis.com/3.19/init.js:160:49) at Object._editHandler (https://js.arcgis.com/3.19/init.js:2006:423) at Object.load (https://js.arcgis.com/3.19/init.js:1965:346) at https://js.arcgis.com/3.19/init.js:993:143 at c (https://js.arcgis.com/3.19/init.js:103:393) at d (https://js.arcgis.com/3.19/init.js:103:182) at b.Deferred.resolve.callback (https://js.arcgis.com/3.19/init.js:105:10) at c (https://js.arcgis.com/3.19/init.js:104:96) at d (https://js.arcgis.com/3.19/init.js:103:182) objectId:-1 success:false __proto__:Object __proto__:Object length:1 __proto__:Array[0]
... View more
03-28-2017
03:11 PM
|
0
|
0
|
2426
|
|
POST
|
interesting... So regarding Item #1: Do not display objected in the attribute table, would the change be made on the Web Map? If I show the tables for all my related tables in ArcGIS Online, I do notice that the OBJECTID field does not appear. When I click "Options" and show/Hide columns, the OBJECTID field is always turned off. Therefore, I think I'm good, right? Regarding Item #2: I'm not following where you're going with that? So, in my setAttributes() method, should I pull out OBJECTID field? Should I ONLY set attributes on "changed" attributes? Out of curiosity, do you know if this documented anywhere? Thanks so much for your help.
... View more
03-28-2017
02:50 PM
|
0
|
2
|
2426
|
|
POST
|
No, it shouldn't be in READONLY mode, but what is the mechanism to place the OBJECTID in READONLY mode? I have been deleting, adding, and updating to the table without problems so I'm assuming that's not the problem. I'm skipping a little code, but here is concept. Please keep in mind that most of the time it works. var attributes = recrd.attributes; //do some changes recrd.setAttributes(attributes); //now apply edits, but I use a deferred since I am handling adds, updates and deletes (I do deletes a bit differently which is why its null). I also don't do adds and updates at the same time. Typically, I'd either only do an update, or combine adds and deletes . var def = new Deferred(); fLayer.applyEdits(newAttributes, updateAttributes, null).then(function(adds, updates, deletes) { if (requestType === "add" && adds && adds.length > 0) { //just get the first one def.resolve({adds: adds[0]}); } else if (requestType === "update" && updates && updates.length > 0) { //just get the first one def.resolve({updates: updates[0]}); } }, function(error) { if (requestType === "update" && error && error.message && error.message.indexOf("Cannot read property 'attributes' of undefined") > -1) { console.log("SaveEditsHandler.js: _prepareAllRequests() we got the Cannot read property 'attributes' of undefined error but we pass it back"); def.resolve({updates: {success: true}}); //TODO: I think this needs the objectId } else { def.reject(); } }); return def.promise;
... View more
03-28-2017
01:57 PM
|
0
|
4
|
2426
|
|
POST
|
I am attempting to applyEdits of a record for a related table that is being updated. My steps are to first set the attributes using record.setAttributes(attributes); I've included all the attributes (including the ObjectID). I then run applyEdits on the proper feature layer. Most of the time it works. Occasionally, however, I receive the following error: "Cannot read property 'attributes' of undefined". I've noticed that even though I receive this error message, the update still works. And as I mentioned above, this doesn't occur every time. Thoughts on why I'm getting this, and how to adjust my code so that this never occurs?
... View more
03-28-2017
12:23 PM
|
0
|
10
|
4120
|
|
POST
|
Perfect. Here's the code I ended up writing. I called this at startup if a config parameter was set. _normalizePositionObjCenter: function(position) { var layoutBox = this._getLayoutBox(); if (this.domNode && this.domNode.clientWidth) { position.left = Math.round((layoutBox.w / 2) - (this.domNode.clientWidth / 2)); position.top = -40; } else { position.left = isFinite(position.left) ? position.left : layoutBox.w - position.right; position.top = isFinite(position.top) ? position.top : layoutBox.h - position.bottom; } delete position.right; delete position.bottom; this.position = lang.mixin(lang.clone(this.position), position); },
... View more
03-10-2017
07:52 AM
|
0
|
0
|
2215
|
|
POST
|
Thanks Robert. This is the correct answer. I appreciate your help.... But the only issue I see in using this methodology is as follows: From a maintenance standpoint, this is a little tricky. If switching to a new version of the API and re-generating my code from the template, this functionality will break. I found the style for the close button in FoldableTheme\panels\FoldablePanel\style.css (.jimu-foldable-panel .close-btn). I may try to place a version of the close button on top of the out of the box close button (and maybe hide the OOB close button). I'll post this when I get it working. Thanks a bunch!!
... View more
02-28-2017
06:47 AM
|
0
|
0
|
1549
|
|
POST
|
No. I have the widget appear at startup, and I want it to be placed in the center of the screen (well, actually about 45 pixels from the top but in the center (left and right). I think if the user moves it though, then, next time it opens, it would work as is. Make sense?
... View more
02-27-2017
03:13 PM
|
0
|
2
|
2215
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-17-2019 08:31 AM | |
| 1 | 11-21-2017 08:58 AM | |
| 1 | 08-14-2018 01:16 PM | |
| 1 | 02-13-2017 07:43 AM | |
| 2 | 10-11-2018 06:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|