POST
|
I have an ArcGIS Server (10.1 SP1) REST map service whose underlying data (in ArcSDE) is changing constantly. And I have an AGSDynamicMapServiceLayer that renders that map service in my app. (It's running in iOS 6.) I want to periodically (e.g. every 60 seconds) refresh the map to see the latest data. However, I can't seem to do it without panning or zooming. I've tried invoking dataChanged on the layer, i.e.: AGSDynamicMapServiceLayer* layer = ...;
[layer dataChanged]; ...but it has no effect. I've tried invoking clear on the layer's view, i.e.: AGSMapView* mapView = ...;
UIView<AGSLayerView>* layerView = [mapView.mapLayerViews objectForKey:layer.name];
[layerView clear]; ...but that has no effect either (other than causing that layer to flash quickly, but reappear exactly as it was). Is there some way to force a refresh from the server? Is it perhaps a caching issue at the operating system level, since the URL of the exported image is the same?
... View more
12-14-2012
05:46 AM
|
0
|
2
|
631
|
POST
|
Short version: What's the best way to handle InfoWindows for Graphics that move and change over time? What would be the least surprising to the user, and how would I accomplish that in the code? Longer story: I have a custom GraphicsLayer in my Flex map application, and it's based on (a slightly-modified version of) the stock Flex Viewer, version 3.0. Periodically a timer fires, my layer loads new data from the server, and existing Graphics in the layer are modified (attribute values and location). This mostly works fine. The graphics move around on the map over time, and the InfoWindows show correct popups. But if there's an InfoWindow showing as its Graphic is being changed, you get odd behavior: If the Graphic's attributes change, the data shown in the InfoWindow remains the same. If the Graphic's position changes, a "ghost" Graphic remains at its original location until the pop-up is closed. Also, the callout anchor doesn't move to follow the Graphic. Instead, I think I'd prefer this: When a Graphic's attributes change, the InfoWindow is updated accordingly. (This is not hard, and I've managed it already.) When a Graphic moves, the highlight graphic moves. When a Graphic moves, the anchor of the InfoWindow moves to follow its center. Those last two desired behaviors seem harder to work out. Any suggestions? Thanks! Chris p.s. If code could simulate a mouse click on the map somehow, then I could just fake-click on the shown-Graphic's new location to popup the new window at the new location. But my handful of attempts with dispatchEvent(...) failed. Maybe someone else reading this has had some luck with it and could suggest how to do it.
... View more
06-21-2012
08:06 AM
|
0
|
0
|
2194
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|