I have GPS devices I want to map on arcGIS maps.

4356
4
08-20-2015 07:35 AM
LeonardoAvalos
New Contributor

Hello. I have some GPS trackers installed on vehicles and have them reporting to a application that collects the data packets and stores them in a database (mysql). I've been doing some reading into adding this live GPS information to the arcGIS maps as a layer, but I am at a loss as to exactly how to do it (without buying more extensions). I could give the arcGIS maps access to the database, but I am trying to figure out as to what exactly this would entitle (writing a SQL script or web service maybe?). What would be the easiest way to get this information into my map?

0 Kudos
4 Replies
ChrisSmith7
Frequent Contributor

Leonardo,

Are you looking to pull one-time static maps (snapshots) in ArcMap, or are you looking to push this to the web in a dynamic fashion?

0 Kudos
LeonardoAvalos
New Contributor

I need to do this in dynamic fashion. I'm not too familiar with GIS and mapping, but if by static maps, you mean they won't change, no. Since this is going to be almost live tracking of devices (every 2 minutes) it always needs to be updates. Currently, I have a platform that adds this information to google maps via the Google Maps API, and I need to see if something similar can be done with this data in arcGIS.

0 Kudos
ChrisSmith7
Frequent Contributor

There's a few ways you can accomplish this - Esri has products that can accomplish this within the ArcGIS ecosystem, but it sounds like you already have a process in place that does this, however, and you just need to hook-up ArcGIS as a forward-facing web app.

I develop against the JSAPI - ArcGIS API for JavaScript - so I can speak a little bit from that angle. There are quite a few ways to go about doing this, however.

I have an ArcGIS Server license, so I can't speak to your licensing needs since you mentioned you are trying to avoid buying more products. The topic has come-up before - ArcGIS Javascript API license question and ArcGIS Javascript API on personal website? - take it for what it is... I can't speak about using the API outside of being licensed for ArcGIS Server for commercial use. You should contact your Esri rep for your use case and consult all of your TOS docs and agreements.

First thing I would do, run through the JSAPI tutorial:

Build your first application | Guide | ArcGIS API for JavaScript

It's all HTML/JavaScript based - you can reference the Esri CDN so you don't even need to host anything except your web page/main module. The API can consume web services published onto ArcGIS Server (like a feature layer), but it doesn't have to be... You can write an AJAX routine to poll a db and create features from a proc call on demand - no need to hit a service hosted on ArcGIS Server.

Esri has an example showing something similar - Feature collection | ArcGIS API for JavaScript - in this sample, they are using esriRequest to pull JSON from Flickr to create points from the retrieved lat/longs. I code in .NET, so I have used ashx/page methods to run procs that return lat/longs, then constructed the JSON needed to display the layer, similar to the Flickr example. So, when the user wants to display the points, they could click a button, which would query the db, pull-back the lat/longs, create the JSON layer, then display on the map. If you do the legwork, I can envision a routine that could update the points in near real-time... I haven't had a need to do this yet, though.

On that same note, if I had to do this, I would consider streaming layers:

Stream Layer | ArcGIS API for JavaScript

Keep in mind that the "ArcGIS GeoEvent Extension for Server must be licensed and installed in your enterprise GIS in order to leverage stream services." So, you would need the extension in addition to ArcGIS Server.

StreamLayer (legacy) | API Reference | ArcGIS API for JavaScript

Stream Services—Documentation (10.3 and 10.3.1) | ArcGIS for Server

Output Connectors—Real-time Data Feeds and Sensors (10.3 and 10.3.1) | ArcGIS for Server

BenGrod
Occasional Contributor III

We stream our live vehicle fleet data into our GIS with GeoEvent Extension. Sounds like you are not looking to add extensions but this is a viable option for handling live/streaming data.