小编jor*_*rdi的帖子

mapbox gl改变图标颜色

有没有办法更改mapbox-gl-js图标图像颜色?

此代码取自https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/,不会将标记颜色更改为红色

map.addLayer({
    "id": "markers",
    "type": "symbol",
    "source": "markers",
    "layout": {
        "icon-image": "{marker-symbol}-15",
        "text-field": "{title}",
        "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
        "text-offset": [0, 0.6],
        "text-anchor": "top"
    },
    "paint": {
        "text-size": 12,
        "icon-color" : "#ff0000"
    }
});
Run Code Online (Sandbox Code Playgroud)

我已经尝试了官方文档中列出的所有选项

mapbox mapbox-gl mapbox-gl-js

17
推荐指数
2
解决办法
9892
查看次数

Google Cloud HTTP Balancer和gzip

当我使用谷歌云网络负载均衡器时,所有我的HTTP gzip连接保持不变,但在使用HTTP/S Load Balancer时,最终用户不会获得gzip压缩内容.

我在VM上使用nginx.使用这个卷曲示例:

curl -H "Accept-Encoding: gzip" -H "Host: my.website.com" -I https://$IP_TO_TEST/login --insecure

我得到Content-Encoding: gzip直接连接到虚拟机并没有gzip的,当我连接到HTTP负载平衡器时.

我已经搜索了所有Google云文档,但他们没有提到它们是否支持或者不从后端压缩内容.

load-balancing google-cloud-platform

7
推荐指数
1
解决办法
1557
查看次数