0

the people I want to make a button that will call the form In this form, I will have two lists (left and right) each will correspond respectively to the left side of the screen and the right These lists should contain layers of groups to display I have a code that creates just a slider for the two layers I selected That button which casts this function and includes or excludes

<input class="push" value="Push me" onclick="Swipe()" type="button">

Its my button

And function making slider

var ctrl = new ol.control.Swipe();
    function Swipe()
    {
   if(window.isSwipe) 
   {
    window.isSwipe = false;
    map.removeControl(ctrl);
    ctrl.removeLayer(osm, true);     
    ctrl.removeLayer(stamen);  
  }
  else 
  {   
    window.isSwipe = true;
    map.addControl(ctrl);
    ctrl.addLayer(osm, true);
    ctrl.addLayer(stamen);
  }
}
  • Can you provide a minimum working sample? There is not enough code and as I'm not sure I understood well what you want to achieve, it's difficult to help. – ThomasG77 Aug 22 '18 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.