Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

A requirement of our web application is to automatically refresh a particular dynamic map service on a timer.

Requirement relates to a client who has a dynamic MS that consistently gets updates from GPS sensors.

Lets forget about Feature Services for now, and WMS or Image services that could change frequently.

Coding wise it was fairly straightforward to achieve this.

Our testers now want a Dynamic Map Service that changes frequently (ideally at least every 15s) so that they can see how this looks back in the front end. Will also help us demonstrate the new capability to our client.

I have been scouring the Esri sample servers but cannot find one.

Is anyone aware of such a public service that we could use for some quick testing?

If the answer is no, there must be scripts out there to emulate GPS tracking movement, to perhaps keep changing the location of some points. Then weI can setup my own service.

share|improve this question
1  
Where is your data behind the map service stored? Are we talking ArcSDE on top of SQL Server/Oracle, file geodatabase, etc...? –  Chad Cooper Aug 24 '11 at 13:16
    
Can be any of the above. Have all ready in our test environment. The new functionality should be tested against all of those environments, but I have little fear of there being an issue at the backend. –  Simon Aug 24 '11 at 13:24
    
Perhaps i2maps ncg.nuim.ie/i2maps/docs/index.php?page=examples could help you? –  radek Aug 24 '11 at 13:40
    
Does it need to work with 10.1, once it is released? –  Kirk Kuykendall Aug 24 '11 at 13:47
    
Don't you need Tracking Server for ArcGIS Server? esri.com/software/arcgis/tracking-server/index.html to do this? –  Mapperz Aug 24 '11 at 14:12
show 3 more comments

3 Answers

up vote 1 down vote accepted

I asked a similar question recently. The answers there may help you.

Q: Sources of realtime spatial data

share|improve this answer
add comment

If you're using REST API, then it seems to me you could do this without arcgis server. When a request comes in for a map, return a json string compliant with the REST API spec, representing new locations.

With windows, this could be done by implementing a WCF Rest service. The service would keep an array of vehicles in memory. Each vehicle would have location, heading, speed, and timestamp. When a request comes in the location would be updated based on how much time has passed since the last timestamp, offsetting some distance based on speed and heading.

If your vehicles need to follow roads, you could dump out a path for each vehicle into a file (x,y and time). The REST service could then use the file to return position updates that follow along those paths.

Your client would need a timer to make a request every 15 seconds. Include a timestamp on the url to prevent caching.

Edit

Another alternative would be to use a layerextension. Create an mxd that points to a dummy featurelayer. The first time ILayerExtensionDraw.BeforeLayerDraw is called, have it replace IFeatureLayer.Featureclass with an in memory featureclass (created using inmemoryworkspacefactory). The point featureclass would represent vehicle locations, with fields for Heading, Speed, and TimeStamp. Each time BeforeLayerDraw is called the locations would be updated based on speed, direction and time since last timestamp. Don't forget to have your layerextension implement IPersistStream.

share|improve this answer
    
Very good example; I did this in the last couple years but without the REST. We had a ArcSDE Layer that would would update with vehicle telemetry that polled from each car every 30 seconds, that data was inserted into a Point layer with the values all time-stamped. We just had a method that would update the map-control (yes-ADF based, yuck) on a configurable window and that would pull the 5 most recent vehicle information points so you could see motion and timing. Worked well for PD/EMS... –  D.E.Wright Aug 24 '11 at 16:15
    
Nice, but not what im after. I need a D-MS that I can call via an Esri API, and then elsewhere in my code I have it to keep re-requesting this service. Your answer seems overkill for my testing needs? –  Simon Aug 25 '11 at 0:03
add comment

The nature of a dynamic map service is that it is rendered on-the-fly, per request. To see any changes on the client-side, a new map request has to be issued.

By default, a dynamic map service hosted through ArcGIS Server will place a "Schema Lock" on the data, disallowing edits on the source data while the service is running.

This can be overcome by editing properties in the map services configuration file (.cfg). A <SchemaLockingEnabled>false</SchemaLockingEnabled> entry will allow changes on the source data while the service is running.

See http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000mr000000

share|improve this answer
    
NOTE: if feature updates are through a feature service, you wont have to worry about the Schema Lock. Also, sending in feature edits through a feature service would be a great way to test the dynamic redrawing of a mapservice. –  Allan Adair Aug 24 '11 at 15:07
    
Allan, best way to get through this issue is a Spatial-View from a SDE/DB source. You update said table live and as the new query fires hits the view and the source-layer is hit. –  D.E.Wright Aug 24 '11 at 16:19
    
That's a good tip from an architectural point of view, and if Simon is using SDE to store/retrieve data that would be another way to test if a dynamic map service is rendering properly in the client-side application. –  Allan Adair Aug 24 '11 at 19:03
    
Another client just had a X/Y value that we would use to create points on the fly based on the current viewable extent and that worked well too. So there is potential, I wish I had a public facing service to demo it; but becuase these are gov services they are all secured. –  D.E.Wright Aug 24 '11 at 19:06
    
This example should work: sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/… It's the sample service that can be edited using the Silverlight interactive SDK. I'm sure there are more out there. help.arcgis.com/en/webapi/silverlight/samples/… –  Allan Adair Aug 24 '11 at 19:17
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.