KML ARGB颜色显示不正确 [英] KML ARGB color doesn't shown correctly

查看:256
本文介绍了KML ARGB颜色显示不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Here is the screenshot of the map that I'm working on:

这是我的KML代码:

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

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

您可以看到颜色值为 ff8C0A23 ,它是 ARGB ,对吧?因此 RGB 颜色是 8C0A23 ,其颜色应如下所示:

As you can see the color value is ff8C0A23, it's ARGB, right? So the RGB color is 8C0A23 that should looks like this:

但是您可以看到边框在地图上显示完全不同。有人知道如何解决吗?

But as you can see the color of the border is shown totally different in the map. Anyone knows how to fix it?

推荐答案

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

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

表达顺序为aabbggrr

The order of expression is 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/

See this color chooser: http://www.zonums.com/gmaps/kml_color/

这篇关于KML ARGB颜色显示不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆