gpt4 book ai didi

google-maps - polymer 风格谷歌地图

转载 作者:行者123 更新时间:2023-12-03 22:23:52 25 4
gpt4 key购买 nike

如何将样式应用于 Polymer 1 google-map 标签?

文档表明 object of styles可以通过标签上的“样式”属性传入。

但是,当使用像 this 这样的东西时以前没有问题,样式没有被加载。

我试过用对象(而不是数组)替换 snazzymaps 中的代码,但这不起作用。

最佳答案

它应该可以工作。您确定您正确传递了样式对象吗?

这为您提供了样式化的 map :

<google-map latitude="37.779" longitude="-122.3892" 
min-zoom="9" max-zoom="11" language="en"
styles='[{"featureType":"landscape","stylers":[{"hue":"#FFBB00"},{"saturation":43.400000000000006},{"lightness":37.599999999999994},{"gamma":1}]},{"featureType":"road.highway","stylers":[{"hue":"#FFC200"},{"saturation":-61.8},{"lightness":45.599999999999994},{"gamma":1}]},{"featureType":"road.arterial","stylers":[{"hue":"#FF0300"},{"saturation":-100},{"lightness":51.19999999999999},{"gamma":1}]},{"featureType":"road.local","stylers":[{"hue":"#FF0300"},{"saturation":-100},{"lightness":52},{"gamma":1}]},{"featureType":"water","stylers":[{"hue":"#0078FF"},{"saturation":-13.200000000000003},{"lightness":2.4000000000000057},{"gamma":1}]},{"featureType":"poi","stylers":[{"hue":"#00FF6A"},{"saturation":-1.0989010989011234},{"lightness":11.200000000000017},{"gamma":1}]}]'>
</google-map>

关于google-maps - polymer 风格谷歌地图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32402565/

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