Hi all,
I'm relatively new to the JavaScript API. I'm looking for help with a, I guess, quite simple case.
This is what I have so far:
A JavaScript API based application, with a FeatureLayer showing some sites, represented as point objects.
The FeatureLayer is defined in ArcMap as a Query Layer; data is fed by the database table SITES with numeric LON and LAT coordinates; points are displayed as XY Data from these LON and LAT coordinates.
This is what the application is supposed to do:
When a user selects one or several sites (with mouse click), the OBJECT_ID of the selected objects and the USER_ID of the actual user must be written in another database table called SITES_USERSELECTION. This table has only two attributes USER_ID and OBJECT_ID, defined as compound primary key. No spatial attributes are required.
I know already how to extract the USER_ID and OBJECT_ID from my data.
This is where I'm stuck:
How can I write my selection into my database table SITES_USERSELECTION? Any hints?
Thanks in advance for your help!
Regards,
Tobias
Hi Tobias,
Using the esri/request class, you can call the REST API's addFeatures method. Below is an example that may get you on the right track:
Thanks, Jake, this is pushing me into the right direction.
This solution requires a feature service (with addFeatures enabled). But doesn't a feature service require a spatial attribute? Is it possible just to create a feature service with only non spatial attributes?
I'm investigating another way at the moment: Couldn't it be possible to do some kind of a direct connection to a Registered Data Store? In my example, we have an Oracle Database (non-spatial), in ArcGIS for Server registered as Data Store. Wouldn't it be possible to build something on top of classes like TableDataSource?
Regards, Tobias