google-maps-api-3 - KML ARGB 颜色显示不正确

标签 google-maps-api-3 colors kml

这是我正在处理的 map 的屏幕截图:

enter image description here

这是我的 KML 代码:

<Style id="line1">
    <LineStyle>
        <color>ff8C0A23</color>
        <width>2</width>
    </LineStyle>
</Style>

<Placemark>
<styleUrl>#line1</styleUrl>
<LineString><coordinates> ...

如您所见,颜色值为 ff8C0A23,它是 ARGB,对吧?所以 RGB 颜色是 8C0A23 应该如下所示:

enter image description here

但是正如您所见,边界的颜色在 map 中显示完全不同。任何人都知道如何解决它?

最佳答案

https://developers.google.com/kml/documentation/kmlreference

根据: https://developers.google.com/kml/documentation/kmlreference#color

表达顺序是aabbggrr

<color>
Color and opacity (alpha) values are expressed in hexadecimal notation. The range of values for any one color 
is 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. The order of expression is 
aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For example, 
if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following: 
<color>7fff0000</color>, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

看这个颜色选择器: http://www.zonums.com/gmaps/kml_color/

关于google-maps-api-3 - KML ARGB 颜色显示不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12812904/

相关文章:

java - 在 java 中读取和解析 KML

css - 巨大的谷歌地图控件(可能是错误?)

javascript - 如何隐藏除我的位置之外的谷歌地图兴趣点?

android - 通过标记查找标记 Google Maps API (Android)

vim编辑器错误颜色

java - 使用 KeyListener 更改颜色

javascript - Google map API 3,闭合多边形(与 "Google maps polygons"相同)

colors - 如何从两个 RGB 值中找到一种颜色的 RGBA 值?

python-2.7 - 如何使用python将kml文件加载到谷歌地球

Google 地球插件忽略 KML 中的 JavaScript