简体   繁体   中英

Google API Maps, Remove Map or Hide it with layer

Is it possible to leave the markers and the city name, but have a black background? Either by removing the map or overlaying something to hide it?

I know this is an odd and seemingly stupid questions as it is a map, but for the purposes of a project I am working on this is required and I would just like to know if this is even possible.

Thanks

Yes. You can just put an opaque black overlay using the Google Maps API. But if you do that you will get some glitch when zooming/dezooming.

I think the best way is to customize the map colors and put everything in black.

See there : http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

  • Be sure to select only Geometry in the Element type section
  • And just put "lightness" to -100.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM