Добрый день.
Если я хочу отображать две карты поверх друг-друга, у меня возникает несколько вопросов.
1. В карте, которая находится сверху, фон прозрачный, и сквозь тайлы хорошо видно нижнюю карту. Но как синхронизировать их, чтобы они перемещались одновременно?
Если я обрабатываю события верхней карты, узнаю ее новые параметры и затем задаю такие же параметры для нижней, то в итоге они сойдутся (секунды через 2-3), но вот анимация портит весь эффект: верхняя карта движется быстрее чем нижняя. Когда отключаю анимацию - тоже проблема: если двигаю карту нажатием левой кнопки мыши, то пока не отпущу карту, нижняя никак не реагирует, хотя верхнюю передвигаю без проблем.
Как их синхронизировать? Есть ли другой способ?
Good afternoon.
If I want to display two maps on top of each other, I have a few questions.
1. In the map, which is on top, background transparent, and through the tiles can clearly see the bottom map. But how to synchronize them so that they move simultaneously?
If I process the events of the upper map, get to know her new options, and then ask the same parameters for the bottom map, then eventually they will converge (2-3 seconds), but the animation here spoils the whole effect: the top map moves faster than the bottom map. When the turn off the animation - also a problem: if you move the map by clicking the left mouse button, it still will not let the map, the bottom does not react, although the top removed without problems.
How to synchronize them? Is there another way?
If I want to display two maps on top of each other, I have a few questions.
1. In the map, which is on top, background transparent, and through the tiles can clearly see the bottom map. But how to synchronize them so that they move simultaneously?
If I process the events of the upper map, get to know her new options, and then ask the same parameters for the bottom map, then eventually they will converge (2-3 seconds), but the animation here spoils the whole effect: the top map moves faster than the bottom map. When the turn off the animation - also a problem: if you move the map by clicking the left mouse button, it still will not let the map, the bottom does not react, although the top removed without problems.
How to synchronize them? Is there another way?