We would like to implement a basemap opacity slider but there doesn't seem to be a method to set this property...
This might help: Help setting opacity/transparency of Basemap
Yes there are a few ways to do this.
Do you want to use arcgis basemap or your own?
There is the setOpacity(); method.
Thanks for the responses so far. I should probably clarify...
We're using our own basemaps, not the ESRI ones, so we creating a new BasemapLayer object then adding it to a new Basemap object. Interestingly you can also use an esri.layers.ArcGISTiledMapServiceLayer as a value for the Basemap "layer" property so I'm not completely sure what the BasemapLayer object is for.
Neither the BasemapLayer or the Basemap object appear to have an opacity property. I tried using an esri.layers.ArcGISTiledMapServiceLayer as the "layer" property of the Basemap object instead of a BasemapLayer object then setting the opacity of the esri.layers.ArcGISTiledMapServiceLayer but that doesn't work.
I know I can work round it by adding the base mapping as a normal map layer (map.addLayer) then setting the opacity of that, but it would mean we couldn't use things like the basemap gallery or basemap toggle widgets. Also, I don't know what the benefits of BasemapLayer and Basemap are. I think I read somewhere about using the levels of detail (lods) to set the number of tick points on a zoom slider but I can't find it now.
You might check out this thread. They hooked the slider up to the basemap being displayed on the map and changed it between 2. It might provide some guidance.
set basemap opacity with slider
Retrieving data ...