Select to view content in your preferred language

Dynamically updating maps via JavaScript - GPS, KML, etc.

772
5
09-19-2011 07:16 AM
ScottGentry
Emerging Contributor
Hello all,

I have a client who is in need of mimicking their ArcGIS desktop version via a webapp.  Currently we have a database consisting of various entries dealing with GPS point placement, layering, etc and would like to somehow bring this functionality to the web, even minimally. 

Essentially, if I select parameters the run against the database such as temperature, location, time intervals, etc. - the webapp app queries the database, pulling GPS data, and then displaying points and so forth on the map on the page after the user hits the "Update Map" button.

I have yet to find any good examples of something similar of this being done - i.e. HTML querying and map updating in real time instead of just pulling/pre-loading from some KML/CSV on a distant server.

Thank you so much for your time.  Any help will be sincerely appreciated!

-Scott
0 Kudos
5 Replies
JeffPace
MVP Alum
Hello all,

I have a client who is in need of mimicking their ArcGIS desktop version via a webapp.  Currently we have a database consisting of various entries dealing with GPS point placement, layering, etc and would like to somehow bring this functionality to the web, even minimally. 

Essentially, if I select parameters the run against the database such as temperature, location, time intervals, etc. - the webapp app queries the database, pulling GPS data, and then displaying points and so forth on the map on the page after the user hits the "Update Map" button.

I have yet to find any good examples of something similar of this being done - i.e. HTML querying and map updating in real time instead of just pulling/pre-loading from some KML/CSV on a distant server.

Thank you so much for your time.  Any help will be sincerely appreciated!

-Scott


You want feature Layers.  You would set up the entire dataset on the server, and then the HTML/javascript can dynamically apply filters or queries.
0 Kudos
KenMorefield
Regular Contributor
Hi Scott,
I don't quite follow what you want to do... Are you looking to create an app that will allow the user to download their gps and display the data right then?  There are a few samples out there that allow the user to download to a .csv file or .gpx file (or other formats), upload them to a server, and then display the results on a map.  There are also some samples that allow the user to drag and drop files onto the map and display the results (with newer browsers).  Another option might be to look into the Garmin Communicator API (if the data is coming from a Garmin gps unit).  You could set up an application that allows the user to download data into json format, and use that right in your mapping application.  Can you provide a few more details on your project?

Ken
0 Kudos
ScottGentry
Emerging Contributor
Hi Scott,
I don't quite follow what you want to do... Are you looking to create an app that will allow the user to download their gps and display the data right then?  There are a few samples out there that allow the user to download to a .csv file or .gpx file (or other formats), upload them to a server, and then display the results on a map.  There are also some samples that allow the user to drag and drop files onto the map and display the results (with newer browsers).  Another option might be to look into the Garmin Communicator API (if the data is coming from a Garmin gps unit).  You could set up an application that allows the user to download data into json format, and use that right in your mapping application.  Can you provide a few more details on your project?

Ken


Thanks Ken,

Essentially what we have is an html form that when filled out queries unique GSP data from our database.  After this query is executed, it automatically updates the map with points corresponding to the GPS data extracted. 

Here is a very general example (pretend all this data is from our unique database): The user wants to query GPS locations of the coldest recorded temperatures in some state (lets say Texas) between the time interval 2008-2009.  The app grabs the GPS data, plots it, and possibly moves the viewing window to Texas, displaying the points (the move part doesn't have to happen).  This will eventually need to be applied to layering as well, but point placement is a minimal requirement.

The reason I posted to this forum is, after much scanning, was unable to find a use case where the state of the points of the map were of direct result of user input.  i.e. - User fills out form, queries data, clicks on some "Update Map" button, and the map is refreshed with the correct points displayed.

I was imagining a simple JavaScript function in the API that could be thrown in a for-loop that auto-generates points on the map upon submission of the form.

Does that help?  Thanks again.

-Scott
0 Kudos
ScottGentry
Emerging Contributor
You want feature Layers.  You would set up the entire dataset on the server, and then the HTML/javascript can dynamically apply filters or queries.


Thanks jeff.pace for the referral, I will look closely into this.
0 Kudos
JeffPace
MVP Alum
Thanks jeff.pace for the referral, I will look closely into this.


If you look at the feature layer samples it should get you started.  For example
http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/time/time_snapshot.html

Shows how to dynamically change what data is displayed based on a time variable.
0 Kudos