0

I am working with a vendor to get some realtime locations that they have posted as an API through their product added to an ArcGIS Online layer.

The API requires you to pass a key through after the call is made in a header. I have tried to pass in additional parameters

enter image description here

When I click add file from URL there is an option to add in parameters and I have attempted to pass in an "Authorization" with the API key, but it always shoots back an error. enter image description here

Is it possible to add in an API key this way through ArcGIS online without using the ArcGIS API for JavaScript?

2

1 Answer 1

1

I do not think you can map this API feeds as a feature layer right away. https://docs.goswift.ly/api-reference/real-time/getrealtimeagencykeygtfsrtvehiclepositions says this API returns Google Protocol Buffer format (PBF), and as far as I know there is no direct facility in AGOL to have a feature layer up and running by that source. In fact, if you need real-time flow of the tracked features, you need to run a https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-geoevent-server.htm. This thread might be helpful, https://community.esri.com/thread/224984-publish-gtfs-realtime-feed-through-arcgis-onlineenterprise.

If you want to do this without GeoEvent server, you can have a look at this, https://www.arcgis.com/home/item.html?id=a0514b345e2f45e3a7230db84485280d. Although this one uses

some JS code running in a Lamda function on Amazon Web Services and polls the API every 30 seconds

to update the layer (so not necessarily real-time).

1
  • While i am frustrated that I cannot end up serving up this myself. The dev in me is excited about finally having a reason to explore lambda!!! Thanks for the response. Commented Feb 10, 2020 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.