gpt4 book ai didi

google-maps - map 颜色较深的水

转载 作者:行者123 更新时间:2023-12-04 06:45:20 26 4
gpt4 key购买 nike

您能否发布一个指向具有较深水的 gmap 的链接,然后我可以查看要更改的值。

最佳答案

干得好:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps Dark Water Style Demo</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 550px; height: 300px;"></div>

<script type="text/javascript">
var darkStyle = [{
featureType: 'water',
elementType: 'all',
stylers: [{ invert_lightness: true }, { hue: '#3300ff' }]
}];

var map = new google.maps.Map(document.getElementById('map'), {
mapTypeControlOptions: {
mapTypeIds: ['darkwater', google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.TERRAIN]
},
center: new google.maps.LatLng(30, 0),
zoom: 1,
mapTypeId: 'darkwater'
});

map.mapTypes.set('darkwater', new google.maps.StyledMapType(darkStyle, { name: 'Dark' }));
</script>
</body>
</html>

这够黑吗?

Google Maps Dark Water Style Demo

这是使用新的 Styled Map featuresv3 API .您可能还想查看 Google Maps API Styled Map Wizard这将允许您以图形方式编辑样式。

关于google-maps - map 颜色较深的水,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3823693/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com