简体   繁体   English

多边形在mapzen中的纹理

[英]Polygon with texture in mapzen

I use mapzen for drawing vector tiles on client side. 我使用mapzen在客户端绘制矢量图块。

How can I draw polygon with texture? 如何绘制带有纹理的多边形?

I have tried few variants such as: 我尝试了几种变体,例如:

  1. Materials 物料
  2. Textures 纹理
  3. Styles 样式

Thanks! 谢谢!

You're on the right track with using all three of those! 使用这三个功能,您的方向正确! I'd look over the textures documentation to see the different options for textures in Tangram. 我将查看纹理文档,以查看七巧板中纹理的不同选项。

Here's an example: 这是一个例子:

sources:
    mapzen:
        type: TopoJSON
        url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson

styles:
    waves:
        base: polygons
        material:
            diffuse:
                texture: https://raw.githubusercontent.com/kkowalsky/tangram-hackz/master/img/seigaiha.png
                mapping: planar
                scale: 0.0000003

layers:
    water:
        data: { source: mapzen }
        draw:
            waves:
                order: 1
                color: white

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM