Tracking Layer - Update option over Add?

9889
27
05-15-2013 05:04 PM
SimonJackson
Occasional Contributor III
I have been doing some testing with the location tracking layer in Collector.

Some questions:

At the moment, I am getting a series of new points added to the layer which are a past record of where my collectors have been.  There is an attribute for accuracy, but none for the collector user, or a timestamp.

Q1. Without these, how might one know which dots relate to which user, and when that user was there?
I tried enabling editor tracking, but this still does not feed in a timestamp?

[ATTACH=CONFIG]24348[/ATTACH]

Without these attributes, I am unable to symbolise or apply a definition query to show a 'snail trail' for each collectors movements in the last XX minutes.

Q2. How can I change the tracking layer to just show me the current position of my collectors, so that these can be seen in applications like Dashboard?  I want to make the tracking layer an UPDATE as opposed to an ADD, but I cant see this option available?

For the demonstrations that were done at Dev Summit, I assume this was making use of GeoEvent Processor?

It might well be that I have missed a step in configuration and the above Questions might involve going back and changing something.  Thanks.
Tags (2)
0 Kudos
27 Replies
KyleBearden1
New Contributor II

I am interested in the ability to only show current location using the location tracking.  Is this something that has been updated since this thread was started in May?

0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

The following expressions does the trick for me

In ago-assistant:

"definitionExpression": "\"CreationDate\" IN (SELECT MAX (\"CreationDate\") FROM db_<the_number>.user_<the_number>.<feature_service_name>_<layer_name> GROUP BY \"Creator\")"

Thanks to Leah for the solution.

0 Kudos
by Anonymous User
Not applicable

Where do you add this script?   I keep getting an error that the JSON is invalid no matter where I add this. 

0 Kudos
LeahSaunders
New Contributor III

The easiest way to figure this out is to add a filter in the web map to the layer that you plan to add the query to.  Then go back to the JSON and look for that query in the JSON by finding "definitionExpression".

0 Kudos
by Anonymous User
Not applicable

How do you find feature service No and user number.    That is the key I am missing.  Also I know the layer name but not the feature service name?   Is there somewhere to get all this information?  I have scoured the Json file but have not found anything the looks like what I have seen from others.

Thank you

Jacob

0 Kudos
by Anonymous User
Not applicable

Figured it out had to go through the Admin definition file. 

0 Kudos
SimonJackson
Occasional Contributor III

Would this approach work in Portal for ArcGIS?

Cant seem to get it working in 10.4.1

Getting a number of errors in console which makes me suspect that it relates to the 'allow standard SQL queries' option which only appears to be available within ArcGIS Online and not Portal admin security settings

0 Kudos
MichaelKelly
Occasional Contributor III

Although it won't display a location if a person is no longer being tracked, there is now a way to filter "in the last" minute through a webmap. This may cater for some use cases. The definitionExpression that is being used is:

EditDate BETWEEN CURRENT_TIMESTAMP - 0.0006944444444444445 AND CURRENT_TIMESTAMP

It does not require the "Allow only standard SQL queries" setting to be turned off. The above definitionExpression is used for the filter below:

The minimum filter you can do through the ArcGIS Online Map Viewer is in the last 1 minute, but you could probably alter that via ArcGIS Online Admin Assistant if necessary.

0 Kudos