Is dynamic data in website possible?

657
8
01-07-2011 07:00 AM
TrixieRife
New Contributor
I am looking to connect the symbols on my map with a spreadsheet database that is updated on a daily to weekly basis. This means, when the spreadsheet is updated, new symbols are added or deleted, with the info presented being current as well. Is it possible to do this through the API's for Flex? Is this possible to do at all? Or do we need to update "by hand" ? or do I need to come up with my own code to make that work? Thanks for any help.
Tags (2)
0 Kudos
8 Replies
DerekLaw
Esri Esteemed Contributor
Hi Trixie,

Yes, this capability is available by using "query layers" - which are SQL queries that can access spatial type data stored in a database (or geodatabase). In ArcMap, you would use a SQL query to create a new (read-only) layer. The layer behaves like any other layer in ArcMap: it can be symbolized, queried, and used in GIS analysis. If the data is updated in the database (independent of the ArcMap session), the update will appear the next time the SQL query is executed.


A typical workflow for ArcGIS Server users:

  1. In ArcMap, create a new query layer to access and display attribute and/or spatial type information from a database.

  2. Use ArcMap as the authoring tool for refining the query layer, such as: defining a definition query on the layer, setting symbology and labeling properties, etc.

  3. Publish the map to ArcGIS Server as an Optimized Map Service (or standard Map Service).

  4. Access the map service with ArcGIS Server clients and/or REST API�??s.


In your case, you could use the ArcGIS API for Flex.
Hope this helps,
0 Kudos
TrixieRife
New Contributor
Thanks for the info!! Very helpful. I have one more question to add to it, you mentioned putting on the Arcserver, can it be done without the server?
0 Kudos
DerekLaw
Esri Esteemed Contributor
Hi Trixie,

You can use query layers in ArcGIS Desktop and it will access data dynamically over a network/locally. However, if you want to access the data dynamically over the Web, then yes, you need ArcGIS Server.

Hope this helps,
0 Kudos
NasifAlshaier
New Contributor
Hi Derek

I have a layer for a pump stations. (points layer) . in that layer , I have some fields that I need to update from a SQL DB... Can I use the Query Layer method you described to do the update my pump stations layer?

thank you in advance for your help.
Nasif
0 Kudos
DerekLaw
Esri Esteemed Contributor
Hi Nasif,

Query layers enable you to retrieve spatial data from a database as read-only layers. They don't support updating existing feature classes. If the data for your pump stations was also contained in the database, then yes, query layers will enable you to have that data "updated" each time the SQL query was executed.

Hope this helps,
0 Kudos
SeanMcGinnis
New Contributor II
I am running into an issue with the query layer. I am able to add the Query Layer to the  table of contents in ArcMap. I then display the data based upon the projected X/Y coordinates stored in the table. When I attempt to save the file as an MSD I get an "unsupported data type" error.

Is it throwing that error because i am using the table to create an event theme? ArcGIS Server still does not support them?

Thanks in advance.
-sean
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sean,

  It is my understanding that this type of setup in the mxd is not supported as a msd so instead just publish the mxd.
0 Kudos
SeanMcGinnis
New Contributor II
Thanks Robert,
I just read a post with similar advice before circling back to find your response.
-sean
0 Kudos