水面图层
Geometry layers support a special representation, the water surface layer.
accomplish
Next we will introduce how to draw water surface.
- you can
L7Found on the official websiteOnline case
🌟 Simple water surface is supported starting from v2.8.1.
🌟 Supports realistic water surfaces starting from version v2.8.4.
simulated water surface
source
It is recommended to use the standard geometry layerGeoJSONdata.
shape
we need to setshapeforocean。
animate
The settings we need to displayanimatefortrue。
layer.animate(true);
style
-
watercolorThe color of shallow water areas defaults to ‘#6D99A8’. -
watercolor2The color of deep water areas defaults to ‘#0F121C’.
simple water surface
source
It is recommended to use the standard geometry layerGeoJSONdata.
shape
we need to setshapeforwater。
animate
The settings we need to displayanimatefortrue。
layer.animate(true);
style
speedwe can passspeedto control the flow speed of the water surface.
style({
speed: 0.5,
});
waterTextureWe can replace the texture of the water surface by setting this property.
The default value is ‘https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ’