Casts for opacity values

This fixes the opacity sliders on iOS. We pass Number values to OpenLayers, and String values to the browser.