How to positionate overlay
See original GitHub issueHow to place popup correctly ? I have a map where every areas (features) are visible on the screen, and I don’t want anyone to move it. So I want the popup to be shown on the map but the popup doesn’t place itself automatically. When I click on some area on the edge of the screen the map gets dragged to the selected area
When I move the map, the size change
Whenever I click on some feature, on the bottom of the screen, the map is dragging me slowly to the selected area because of the “pointOnSurface” method How can the popup be shown only on visible screen ?
<div class="ol-overlay-container ol-selectable" style="position: absolute; top: 179px; left: 0;">
Top and left values are dynamically changed every one second
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
CSS Overlay Techniques - Codrops
First, you need to make sure that the overlay is positioned absolutely with respect to the body . So, if the overlay is...
Read more >How to Overlay One Div Over Another - W3docs
Style the "overlay" class by using the z-index, margin and background properties. .container { width: 150px; height: 150px; position: ...
Read more >How To Create an Overlay Effect - W3Schools
Learn how to create an overlay effect with CSS. ... Turn on the overlay effect ... Example. #overlay { position: fixed; /* Sit...
Read more >Position overlay div - css - Stack Overflow
You need to set the parent element using position relative then use position absolute on the element you want to position.
Read more >Positioning Overlay Content with CSS Grid
Recently, I have been experimenting with CSS Grid and alignment properties to create component layouts that contain multiple overlapping ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I got it. In the demo there is additional css styles applied to the overlay container that prevents positioning from property. And also there is a bug in the
vl-overlay
styles, it always haveposition: abosulte
.According to the demo code, try to comment out this styles https://github.com/ghettovoice/vuelayers-demo/blob/master/src/App.vue#L761
And add this rules to workaround style bug:
Allright everything is working fine now ! Thanks a lot for the plugin 😃