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;
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
openlayers jquery tab
New contributor
New contributor
edited Apr 5 at 15:21
RemiF
New contributor
asked Apr 5 at 13:09
RemiFRemiF
12
12
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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