Skip to content

Commit

Permalink
doc: ImageryLayer order
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jan 15, 2019
1 parent 8628c13 commit 5cac188
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/ImageryLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ import createCesiumComponent from "./core/CesiumComponent";
@summary
`ImageryLayer` is a imargery layer on the globe.
Layers are added in order of JSX from the top.
```jsx
// Back layer
<ImageryLayer imageryProvider={provider1} />
<ImageryLayer imageryProvider={provider2} />
<ImageryLayer imageryProvider={provider3} />
// Front layer
```
is equivalent to:
```js
viewer.imageryLayers.add(provider1);
viewer.imageryLayers.add(provider2);
viewer.imageryLayers.add(provider3);
```
As a result, the layer added at the very end is the frontmost when actually displayed.
Note: `imageryProvider` property is read only. See also [guide](/guide#cesium-read-only-properties).
*/

Expand Down Expand Up @@ -155,6 +175,7 @@ const ImageryLayer = createCesiumComponent<
mount(element, context) {
if (context.imageryLayerCollection) {
context.imageryLayerCollection.add(element);
console.log("added", element);
}
},
unmount(element, context) {
Expand Down

0 comments on commit 5cac188

Please sign in to comment.