OpenLayers 4.6.5 - jQuery : map disappears after hide() show() event The 2019 Stack Overflow Developer Survey Results Are InOpenLayers Hide/Show Layers from external checkboxesOpenLayers Vector polygon and jQuery DroppableUse new OpenLayers.Filter.Logical from OpenLayers into jQueryAdd Jquery UI Dialog Box to OpenLayers 3 overlayStop OpenLayers 3 map firing click event after draggingMap disappears when setCenter in openlayers 3OpenLayers 4 set map target with jQueryHide/show data inside Layer in OpenLayers 4Show/hide features on layer in OpenLayers?Layer disappears after adding overlapping layer to OpenLayers?

Is three citations per paragraph excessive for undergraduate research paper?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

Deal with toxic manager when you can't quit

If a Druid sees an animal’s corpse, can they wild shape into that animal?

Are there incongruent pythagorean triangles with the same perimeter and same area?

How are circuits which use complex ICs normally simulated?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Is there a symbol for a right arrow with a square in the middle?

Lightning Grid - Columns and Rows?

During Temple times, who can butcher a kosher animal?

Is an up-to-date browser secure on an out-of-date OS?

Is "plugging out" electronic devices an American expression?

Why not take a picture of a closer black hole?

"as much details as you can remember"

Can a flute soloist sit?

Right tool to dig six foot holes?

How come people say “Would of”?

Aging parents with no investments

Did Section 31 appear in Star Trek: The Next Generation?

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

Where to refill my bottle in India?

The difference between dialogue marks

How to deal with fear of taking dependencies



OpenLayers 4.6.5 - jQuery : map disappears after hide() show() event



The 2019 Stack Overflow Developer Survey Results Are InOpenLayers Hide/Show Layers from external checkboxesOpenLayers Vector polygon and jQuery DroppableUse new OpenLayers.Filter.Logical from OpenLayers into jQueryAdd Jquery UI Dialog Box to OpenLayers 3 overlayStop OpenLayers 3 map firing click event after draggingMap disappears when setCenter in openlayers 3OpenLayers 4 set map target with jQueryHide/show data inside Layer in OpenLayers 4Show/hide features on layer in OpenLayers?Layer disappears after adding overlapping layer to OpenLayers?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















This is a little example of what I'm trying to do : https://codepen.io/remifroger/pen/ZZWgbM



I would like to build a tabs design, with one map in each tab. I use jQuery to deal with it but I have a trouble when I resize the window.



I already tested to use map.updateSize() in each click event but it doesn't work, do you have any ideas to fix this behavior ?



EDIT



Problem comes from the hide() method which applies a display: none on a parent element of my div containing the map => it also affects a display: none on the map div's; and this generates the unwanted behaviors



So to fix the problem, instead of show() and hide() methods, I use the visibility property (with jQuery : $("#id").css('visibility', '...')) which doesn't generate any display: none



And I put the content of the tab content in position: absolute to eliminate spaces



I updated the CodePen, but I'm still open to any improvement, this method doesn't seem optimal !










share|improve this question









New contributor




RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    This is a little example of what I'm trying to do : https://codepen.io/remifroger/pen/ZZWgbM



    I would like to build a tabs design, with one map in each tab. I use jQuery to deal with it but I have a trouble when I resize the window.



    I already tested to use map.updateSize() in each click event but it doesn't work, do you have any ideas to fix this behavior ?



    EDIT



    Problem comes from the hide() method which applies a display: none on a parent element of my div containing the map => it also affects a display: none on the map div's; and this generates the unwanted behaviors



    So to fix the problem, instead of show() and hide() methods, I use the visibility property (with jQuery : $("#id").css('visibility', '...')) which doesn't generate any display: none



    And I put the content of the tab content in position: absolute to eliminate spaces



    I updated the CodePen, but I'm still open to any improvement, this method doesn't seem optimal !










    share|improve this question









    New contributor




    RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      This is a little example of what I'm trying to do : https://codepen.io/remifroger/pen/ZZWgbM



      I would like to build a tabs design, with one map in each tab. I use jQuery to deal with it but I have a trouble when I resize the window.



      I already tested to use map.updateSize() in each click event but it doesn't work, do you have any ideas to fix this behavior ?



      EDIT



      Problem comes from the hide() method which applies a display: none on a parent element of my div containing the map => it also affects a display: none on the map div's; and this generates the unwanted behaviors



      So to fix the problem, instead of show() and hide() methods, I use the visibility property (with jQuery : $("#id").css('visibility', '...')) which doesn't generate any display: none



      And I put the content of the tab content in position: absolute to eliminate spaces



      I updated the CodePen, but I'm still open to any improvement, this method doesn't seem optimal !










      share|improve this question









      New contributor




      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      This is a little example of what I'm trying to do : https://codepen.io/remifroger/pen/ZZWgbM



      I would like to build a tabs design, with one map in each tab. I use jQuery to deal with it but I have a trouble when I resize the window.



      I already tested to use map.updateSize() in each click event but it doesn't work, do you have any ideas to fix this behavior ?



      EDIT



      Problem comes from the hide() method which applies a display: none on a parent element of my div containing the map => it also affects a display: none on the map div's; and this generates the unwanted behaviors



      So to fix the problem, instead of show() and hide() methods, I use the visibility property (with jQuery : $("#id").css('visibility', '...')) which doesn't generate any display: none



      And I put the content of the tab content in position: absolute to eliminate spaces



      I updated the CodePen, but I'm still open to any improvement, this method doesn't seem optimal !







      openlayers jquery tab






      share|improve this question









      New contributor




      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Apr 5 at 15:21







      RemiF













      New contributor




      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Apr 5 at 13:09









      RemiFRemiF

      12




      12




      New contributor




      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      RemiF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "79"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          RemiF is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317898%2fopenlayers-4-6-5-jquery-map-disappears-after-hide-show-event%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          RemiF is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          RemiF is a new contributor. Be nice, and check out our Code of Conduct.












          RemiF is a new contributor. Be nice, and check out our Code of Conduct.











          RemiF is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f317898%2fopenlayers-4-6-5-jquery-map-disappears-after-hide-show-event%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

          QGIS export composer to PDF scale the map [closed] Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Print Composer QGIS 2.6, how to export image?QGIS 2.8.1 print composer won't export all OpenCycleMap base layer tilesSave Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?Export QGIS Print Composer PDF with searchable text labelsQGIS Print Composer does not change from landscape to portrait orientation?How can I avoid map size and scale changes in print composer?Fuzzy PDF export in QGIS running on macSierra OSExport the legend into its 100% size using Print ComposerScale-dependent rendering in QGIS PDF output

          PDF-ში გადმოწერა სანავიგაციო მენიუproject page