Web Design Discussion > General Web Design Discussion

Opacity of base maps

(1/2) > >>

mapcat:

How possible would it be to make the opacity of the base maps user-controlled? For example, the US Census Bureau's TIGERWeb features an opacity slider on its maps.


https://tigerweb.geo.census.gov/tigerweb/


(expand any category in the layers menu to see it)

Jim:
Do you mean the background map tiles?  If so, only if Google's API has that level of control, I think.


--- Quote from: mapcat on February 29, 2016, 07:59:12 pm ---
How possible would it be to make the opacity of the base maps user-controlled? For example, the US Census Bureau's TIGERWeb features an opacity slider on its maps.


https://tigerweb.geo.census.gov/tigerweb/


(expand any category in the layers menu to see it)

--- End quote ---

mapcat:

--- Quote from: Jim on February 29, 2016, 08:11:45 pm ---Do you mean the background map tiles?  If so, only if Google's API has that level of control, I think.

--- End quote ---
That's right. Thanks.

theFXexpert:
Somewhat relevant: I submitted a pull request that implements a blank map layer as described in this issue.

https://github.com/TravelMapping/Web/pull/46

After playing around with Chrome's JS console, google does have functions for setting opacity for defined map types: map.mapTypes.Mapnik.setOpacity(0.5) for example.
I have only been able to get it to work with the MQOpenMap, MQOpenSat, and Mapnik layers. For whatever reason this doesn't work on google's built-in layers.

Jim:

--- Quote from: theFXexpert on March 02, 2016, 11:01:26 am ---Somewhat relevant: I submitted a pull request that implements a blank map layer as described in this issue.

https://github.com/TravelMapping/Web/pull/46

--- End quote ---

Thanks, I hope to get this and the other items that have been submitted tested out and (if all seems OK) live on the site in the next few days.

Navigation

[0] Message Index

[#] Next page

Go to full version