USGS-CMG / terriajs-dive

USGS-CDI TerriaJS Project
5 stars 9 forks source link

Allowing user to alter WebMapServiceCatalogItem parameters #10

Open jiwalker-usgs opened 8 years ago

jiwalker-usgs commented 8 years ago

For the map COLORSCALERANGE feature I've added a widget to change the min and max range that is placed into the parameters field on WebMapServiceCatalogItem. In changing these values I cannot determine the appropriate way to reload the CatalogItem to use the new parameters (the ImageryProvider is already setup with what appears to be a fixed parameters list). I've gotten around this by toggling the isShown property, but this has undesired effects.

@kring what would you recommend for changing the parameters and getting them to apply to GetMap and GetLegendGraphic requests when changing parameters like COLORSCALERANGE?

kring commented 8 years ago

@jiwalker-usgs this is a bit tricky. If you can point me to the branch with your work so far, I can add that bit and show you how I did it.

jiwalker-usgs commented 8 years ago

@kring I've got my changes here https://github.com/jiwalker-usgs/terriajs/commit/a9955770f04f9978ffc461a782e7b19e3ccbbc6d and it works if I manually toggle the item off and on. I'm missing the programmatic way of doing this, and the legend seems to be somewhat static.

kring commented 8 years ago

Ok I've made the changes: https://github.com/TerriaJS/terriajs/compare/newui...colorScaleRange?expand=1

Basically we need to do two things:

I also changed the UI to call a refresh function that triggers these two actions when the color range changes.