最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How do I change the color of the sea in google maps v3 - Stack Overflow

programmeradmin2浏览0评论

I am using google maps v3 in a new website I am creating and I want to be able to display the sea color as white or transparent. I cannot see how to do this so if anyone knows I would appreciate the help.

By the way, the google map is of country: Ireland

I am using google maps v3 in a new website I am creating and I want to be able to display the sea color as white or transparent. I cannot see how to do this so if anyone knows I would appreciate the help.

By the way, the google map is of country: Ireland

Share Improve this question edited Jun 14, 2013 at 16:18 user229044 239k41 gold badges344 silver badges346 bronze badges asked Mar 8, 2012 at 13:46 user1257114user1257114 1,1591 gold badge10 silver badges8 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 8

Using the Google Maps API v3:

[
  {
    featureType: "water",
    elementType: "geometry",
    stylers: [
        { invert_lightness: true },
        { hue: "#ff003b" },
        { saturation: -100 },
        { lightness: 100 } /* generates "white" color */
    ]
  }
]

Use the following tool to assist in styling maps:

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

You can style your map with the Styled Maps Wizard

When you are done you can export the changes via the Show JSON button at the bottom right. Finally, pass the resulting JSON to your map:

var map = new google.maps.Map(container_element, {styles: your_exported_settings});

Or if you need to change an existing map instance:

map.setOptions({styles: your_exported_settings});

You can also check out the Google Maps JavaScript API V3 Styling guide

You have also a wizard to know how it will work with your stylers there :
Stylers Wizard Google Maps
You can click on Show JSON to see the code ! Have fun ;) !

发布评论

评论列表(0)

  1. 暂无评论