简体   繁体   English

自定义街景地图上的自适应叠加层div

[英]Responsive overlay div on custom Streetview map

I am creating a custom indoor streetview of my university, so i have no LatLng values to add markers, is it possible to put an overlay on the map that will stay in one position on the image? 我正在创建我大学的自定义室内街景,因此我没有LatLng值可添加标记,是否可以在地图上放置一个叠加层,使其停留在图像的某个位置?

by this i mean if there is a div overlay ontop of a door, when moving the map the div overlay should move with the map and go off screen if necessary. 我的意思是,如果门上有div叠加层,则在移动地图时div叠加层应与地图一起移动,并在必要时退出屏幕。 (so basically a custom marker that does not need Latlng argument). (因此基本上是不需要Latlng参数的自定义标记)。

I've tried fiddling with the CSS position properties and have had no luck, is it possible to do? 我尝试摆弄CSS位置属性,但没有运气,可以这样做吗?

You can use css transitions here's my [Image overlay][1] 您可以使用CSS转换,这是我的[图像叠加层] [1]

[1]: http://codepen.io/dfrierson2/pen/NPeOoJ

.gallery figure {
        display: inline-block;
        width: 315px;
        height: 268px;
        margin: 0 5px 5px 5px;
        position: relative;
}
.gallery figcaption {
        position: absolute;
        width: 290px;
        height: 217px;
        bottom: 32px;
        left: 13px;
        right: 0px;
        top: 11px;
        opacity: 0;
    border: 1px solid #ddd;



}
.gallery figcaption:hover {
    opacity: 1;
    -webkit-transition: opacity .3s ease-in;
    -moz-transition: opacity .3s ease-in;
    -o-transition: opacity .3s ease-in;

}

<body>

<!--Image overlay starts here-->

        <div class="gallery">
      <h1>Image Overlay</h1>
            <figure>
                <a href="#"><img src="http://placehold.it/315x268"></a>
                <figcaption><img src="http://placehold.it/290x217"/></figcaption>
            </figure>



        </div>


</body>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM