Open gbrunner opened 10 years ago
Good idea. I see that the legend resource includes a parameter for the rendering rule, so it's promising that we could pass along the model parameters to the raster function and get a legend that reflects the model output:
I have not tried this myself, but I would suspect that if that works, the legend would look a lot like (if not exactly like) the color ramp already in the app. Worth testing. Could be useful for reports etc.
This might be particularly helpful when previewing individual layers. When you preview, you don't see the color ramp on the layer list.
That's an interesting use case.
Though in the long run I've got another idea for preview. I think it would be cool for the "preview" mode allow users to adjust the layer classification and see the results on the map for just that layer.
This could even be done via client-side raster functions (calling to the server-side raster function w/ 1 layer at 100%), see Defining a raster function template on client side:
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000rv000000
Tom
My users commented that they'd lke to see a Legend with the Image Service layer on the map. I noticed that in the Rest API, Legend is a Child resource of the Image Service. I was wondering if we could use this to show and update a legend on a map after every model is run.