N
N
nurzhannogerbek2020-01-06 22:35:48
JavaScript
nurzhannogerbek, 2020-01-06 22:35:48

How to reapply WMS layers on a Yandex map?

Hello comrades! Faced a strange problem. Please help me find the possible problem.
I put a WMS layer on the Yandex map, which was formed by GeoServer. This is done quite simply map.layers.add(first_layer):. The layer is applied to the map instantly, without any problems. Now when I try to map another layer, I first remove the first one and then apply the second one. I do it according to the documentation :

map.layers.remove(first_layer)
map.layers.add(second_layer)

The first layer is removed, but the second layer does not appear. The second layer appears only when the zoom is changed. At the zoom at which the operation was originally performed, the second layer is not displayed. I also tried to apply the second layer first, and only then apply the first layer. The behavior is similar. With what it can be connected?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question