I am working on swipe based ol3 web application where i want to use spy glass for dynamic added layers. I have seen layer spy example but this is only for single layer swipe .. I want for dynamic layers.

closed as unclear what you're asking by whyzar, Jochen Schwarze, BERA, radouxju, Andre Silva Mar 5 at 19:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What do you mean by 'dynamic added layers'? are they added after map initialization? – Chase Choi May 15 '17 at 3:51
  • yes.-@ChaseChoi – Priyanka May 24 '17 at 6:05
  • Have you tried adding precompose, postcompose event on both layers which you want to clip? layer1 (bg), layer2, layer3 -- for layer2 and layer3 – Chase Choi May 24 '17 at 8:06
  • Yes,it works for predefined layer,,but i want to spyglass functionality for dynamically added layers..@ChaseChoi – Priyanka May 25 '17 at 9:36
  • Why not? just like this: codepen. layers are added at the bottom of the code. – Chase Choi May 26 '17 at 9:30