We are trying to determine an efficient way of rendering features depending on values in a different table. Background is this: We have a few thousand features in a MapService on an ArcGIS Server and access that via ArcGIS Runtime apps. Let's say those features represent buildings. From time to time, there is work done in those buildings (repairs, cleaning, ...). This work is being logged in a second table with a reference to the building (via the objectid) and also structured into work packages. These work packages are either recurring or can be ad hoc (e. g. if there's a sudden equipment failure that needs to be dealt with immediately).
What we want do now is render the buildings differently based on their entries in this second table (e. g. render them red, when the last repair failed; render them green when they were cleaned this week, render only those in a specific work package, ...).
Obviously, a simple renderer is unable to do this, as we are only able to define it on the attributes of the feature (the buildings in this case).
Right now we're wondering how to effectively render these features. We are unable to change the data structure, so we cannot just add some value to the feature itself. The options we see are the following:
Prerender the layers. This would be done via a batch program or being intiated by the user. This would mean that we'd have to publish the MapService with those layers inside of it, which is a problem because we'd be unable to quickly add new work packages as they'd need their own layers.
Render them on the device. This might have an impact on performance, though I don't think that's going to be a real problem. One problem though, is that by doing this, we'd have differing presentation depending on which device you use (e. g. the people in the back office use a desktop app, while the teams in the field are mostly equipped with Android devices). Also, there would be the problem of how to efficiently render them on the device as one would have to query the database on how to render which feature.
Use a Server Object Interceptor. This way, we could inject a virtual field into the features and use that for rendering on the device. We don't have any experience with SOIs, though and are not totally convinced in regards to performance as we'd have to do additional database queries on each request.
Is there any obvious option that we're missing? If not, does anyone have experience with our choices so far or is otherwise able to shed some light on which one's the way to go?
No comments:
Post a Comment