POST
|
That was it! Thanks so much. I'm having trouble understanding what those changes accomplished though. For the FID, I get that that was an issue, didn't realize it didn't have the GlobalID. However, I don't know what the purpose of that line is. For the other part, before making that change everything was working, despite that error still occurring. What do you mean "Township layer"? So this error probably occurs in the original tutorial version as well? It comes from the moments when the cursor is not near a feature to obtain graphics from? Thanks again! Glad I'm getting somewhere. Working through issues like this help me learn it better.
... View more
06-16-2020
03:28 PM
|
0
|
2
|
1288
|
POST
|
Hi George Sorry it took so long to reply. I tried your code and am getting the same result...same error. No change. Note that I do see the layer in the console.log....so it does seem to be retrieving it. I made an adjustment to what I wrapped in the view.when function and that cleared up the errors but the buffer event didn't happen and didn't error. Any other thoughts? I will keep adjusting things to see what I can figure out. I also again tried the code straight from the tutorial and it works fine so the issue must lie in the difference between a featureLayer and webMap. Thanks! EDIT: I started over from scratch and seemed to get somewhere so I must have had something messy. So what happens now though is I get 1 buffer returned and then get that same graphic undefined error again after. The above codepen had been updated with latest code.
... View more
06-16-2020
10:38 AM
|
0
|
4
|
1288
|
POST
|
Maybe this will help. The full code I am using currently: https://codepen.io/egardecki/pen/OJMNyxz?editors=1000
... View more
06-11-2020
06:08 AM
|
0
|
7
|
1288
|
POST
|
I also tried the screen point suggestion and no change.
... View more
06-11-2020
06:01 AM
|
0
|
0
|
4282
|
POST
|
The code I am using is straight out of the api tutorial. The only adjustment I am making is to reference a layer within a webMap rather than a layer added via FeatureLayer. Using the code as-is from the tutorial works just fine so I do not believe the problem would lie in the screen point. I have to imagine it isn't finding the layer? I tried wrapping the applicable code in the view.when but I still receive the same error. P.S. This topic was posted by me. I was accidentally logged in as another user. Feel free to tag me instead of that user. Thanks for your reply!
... View more
06-11-2020
05:55 AM
|
0
|
0
|
4282
|
POST
|
I don't think I understand. So if I use your example, I would then have the layer in the map twice no? I have a webmap pulled in with all its layers, then would load one individual layer again? The point of what I'm trying to do is learn how to work with the layers within the webmap as opposed to bringing in individual layers. Does this make sense? Thanks!
... View more
06-10-2020
12:51 PM
|
0
|
0
|
4282
|
POST
|
Thanks for the reply. I adjusted the script to use allLayers but am still getting the same error. Here is the full applicable section of the code: var parksLayer = webmap.allLayers.find(function(layer) { return layer.title === "Parks"; }); var activeGraphic; function findNearestGraphic(event) { return view.hitTest(event).then(function (response) { var graphic; // Get the Trail graphics only if (response.results.length) { graphic = response.results.filter(function (result) { return (result.graphic.layer === parksLayer); })[0].graphic; ************************************************************* } // Only return new graphics are found if (graphic) { if (!activeGraphic || (activeGraphic.attributes.OBJECTID !== graphic.attributes.OBJECTID)) { return graphic; } else { return null; } } else { return null; } }); } var bufferGraphic; function drawBuffer(bufferGeometry) { view.graphics.remove(bufferGraphic); bufferGraphic = new Graphic({ geometry: bufferGeometry, symbol: { type: "simple-fill", color: "rgba(0,0,0,0)", outline: { color: "rgba(0,0,0,.5)", width: 1 } } }); view.graphics.add(bufferGraphic); } view.on("pointer-move", function(event){ findNearestGraphic(event).then(function(graphic){ if (graphic) { activeGraphic = graphic; var buffer = geometryEngine.geodesicBuffer(activeGraphic.geometry, .25, "miles"); drawBuffer(buffer); } }); }); The line with the error is marked with all the asterisks. I do not understand what that line is doing exactly so I can't figure out what's wrong and why it doesn't like me using a webmap layer. Also, was there anything wrong with using findLayerById instead of allLayers? thanks
... View more
06-08-2020
09:48 AM
|
0
|
2
|
4282
|
POST
|
I am opening the survey via the browser on my phone. Not the app. The url is allowed to access the gps. When using the geopoint, I can get my location by clicking the location button fine, it just does not default to my location. I see no setting anywhere in Connect that would allow that. Can you assist? Also, when building via the web, the geopoint starts as a preview map, which is desired, but starting via Connect only shows a button. Can that be adjusted? Why do these differences exist between the two? Thanks
... View more
03-20-2019
05:42 PM
|
0
|
0
|
856
|
POST
|
Hello, I'm trying to build a simple form for folks to report issues, such as potholes, street light out etc. One of the key things I wanted was for the geopoint map, where the user selects the issue location, to show the already existing features (previously entered survey form locations) in order to show that something was already reported or resolved. This didn't seem possible using the web designer so I started with the desktop (Connect) application using an existing feature service. Here are the issues I am seeing: Using Connect still doesn't show the existing features on the map Connect does not offer the same options as the web configurator. Such as The geopoint question doesn't show the actual map preview at all. You have to hit a button first The geopoint map does not seem to allow it to default to the users current location "Allow the respondent to add another record" doesn't seem to exist and if I try to add that using the web configurator after creating in Connect, it simply doesn't save it that way. So Connect just seems to not have as much functionality in this way so I suppose I will stick with the web configurator but I'm still left with how to display the existing features on the map. Any suggestions on how to remedy this? Thanks!
... View more
03-20-2019
12:31 PM
|
0
|
4
|
1099
|
POST
|
I'm trying to figure out what my options are for a potential project. I want to be able to use AGOL to collect point features via a GeoForm but at some time after the point is placed (either immediately or run in bulk say hourly) I need to be able to pull data from the polygon it falls within. For example, say the polygons are the States. If I place a point feature in New York, I want to be able to notify the person in charge of New York that a new point was placed. I believe I know how I will manage the notification but I'm trying to figure out how I will pull the email address for the particular location if falls within automatically. So basically I want to run an intersect tool on the data automatically. I want to automate this and do not want to use Desktop. Any suggestions on how I could accomplish this? Thanks!
... View more
03-07-2019
06:38 AM
|
0
|
0
|
400
|
POST
|
That did it! Thanks much! Is there anything else I am missing in here to ensure I don't see any further issues? This is the JSON for adding a new table to the layer service { "layers" : [ { "name" : "Maintenance", "type" : "Table", "objectIdField" : "FID", "fields" : [ { "name" : "reference", "type" : "esriFieldTypeGUID", "alias" : "reference", "sqlType" : "sqlTypeOther", "nullable" : false, "editable" : true, "length" : 38, "visible" : true, "domain" : null, "defaultValue" : null }, { "name" : "MaintDate", "type" : "esriFieldTypeDate", "alias" : "Maintenance Date", "sqlType" : "sqlTypeOther", "length" : 8, "nullable" : true, "editable" : true, "domain" : null, "defaultValue" : null }, { "name" : "MaintType", "type" : "esriFieldTypeString", "actualType" : "nvarchar", "alias" : "Maintenance Type", "sqlType" : "sqlTypeNVarchar", "length" : 256, "nullable" : true, "editable" : true, "visible" : true, "domain" : null, "defaultValue" : null }, { "name" : "Notes", "type" : "esriFieldTypeString", "actualType" : "nvarchar", "alias" : "Notes", "sqlType" : "sqlTypeNVarchar", "length" : 256, "nullable" : true, "editable" : true, "visible" : true, "domain" : null, "defaultValue" : null }, { "name" : "CreationDate", "type" : "esriFieldTypeDate", "alias" : "CreationDate", "sqlType" : "sqlTypeOther", "length" : 8, "nullable" : true, "editable" : false, "domain" : null, "defaultValue" : null }, { "name" : "Creator", "type" : "esriFieldTypeString", "alias" : "Creator", "sqlType" : "sqlTypeOther", "length" : 50, "nullable" : true, "editable" : false, "domain" : null, "defaultValue" : null }, { "name" : "EditDate", "type" : "esriFieldTypeDate", "alias" : "EditDate", "sqlType" : "sqlTypeOther", "length" : 8, "nullable" : true, "editable" : false, "domain" : null, "defaultValue" : null }, { "name" : "Editor", "type" : "esriFieldTypeString", "alias" : "Editor", "sqlType" : "sqlTypeOther", "length" : 50, "nullable" : true, "editable" : false, "domain" : null, "defaultValue" : null }, { "name" : "FID", "type" : "esriFieldTypeOID", "actualType" : "int", "alias" : "FID", "sqlType" : "sqlTypeInteger", "length" : 4, "nullable" : false, "editable" : false, "domain" : null, "defaultValue" : null } ] } ] }
... View more
02-08-2019
12:37 PM
|
0
|
1
|
1238
|
POST
|
I can see the relationship in the JSON and in REST. It is definitely there... If I had an extra comma, the API errors out so that isn't possible. Where did you find that?
... View more
02-08-2019
11:38 AM
|
0
|
3
|
1238
|
POST
|
I was able to delete the duplicate relationship by deleteFromDefinition I still can't see the related records and when I try to add a new one in Collector, the app crashes each time.
... View more
02-08-2019
11:18 AM
|
0
|
5
|
1238
|
POST
|
Ok after digging around for a while it seems that the FID field I added was incorrect in the type field. It needed to be type OID. However, I did what I did because I was following this, which had the FID as type integer. Add to Definition (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers I was able to add a related record via the web app now, however there are still several problems. The related table is now listed twice in the popup....presumably due to the deleting of the table prior to deleting the relationship. I do not know how to delete the duplicate. I still cannot view the related records at all. Nothing is listed after entering one. In Collector, I still cannot add a related record, or view existing. Possibly due to #1 above.
... View more
02-08-2019
11:11 AM
|
0
|
6
|
1238
|
Title | Kudos | Posted |
---|---|---|
1 | 01-10-2019 09:52 PM | |
1 | 01-08-2019 01:57 PM | |
4 | 01-08-2019 11:59 AM | |
4 | 01-08-2019 10:26 AM | |
1 | 01-10-2019 02:57 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|