layer添加元素 openlayer_openlayers添加弹出框

这篇博客介绍了如何在OpenLayers中结合Layer库来添加地图弹出框,展示轨迹信息,并实现轨迹动画播放。通过示例代码展示了如何创建地图,设置点的样式,以及在地图上点击事件触发时展示弹出框,同时提供了控制速度的滑块以调整动画播放速度。
摘要由CSDN通过智能技术生成
Document

html,

body {

width: 100%;

height: 100%;

margin: 0;

}

.map {

width: 100%;

height: 100%;

background: #f6f6f4;

}

input[type=range] {

-webkit-appearance: none;

width: 300px;

border-radius: 10px;

/*这个属性设置使填充进度条时的图形为圆角*/

}

input[type=range]::-webkit-slider-thumb {

-webkit-appearance: none;

}

input[type=range]::-webkit-slider-runnable-track {

height: 15px;

border-radius: 10px;

/*将轨道设为圆角的*/

box-shadow: 0 1px 1px #65bdd3, inset 0 .125em .125em #127f9b;

/*轨道内置阴影效果*/

}

input[type=range]:focus {

outline: none;

}

input[type=range]::-webkit-slider-thumb {

-webkit-appearance: none;

height: 25px;

width: 25px;

margin-top: -5px;

/*使滑块超出轨道部分的偏移量相等*/

background: #08c1e6;

border-radius: 50%;

/*外观设置为圆形*/

border: solid 0.125em rgba(49, 155, 187, 0.5);

/*设置边框*/

box-shadow: 0 .125em .125em #08c1e6;

/*添加底部阴影*/

}

/**

下面是弹框样式

*/

.ol-popup {

position: absolute;

background-color: white;

-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));

filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));

border-radius: 10px;

border: 1px solid #cccccc;

bottom: 12px;

left: -50px;

min-width: 280px;

}

.ol-popup:after,

.ol-popup:before {

top: 100%;

border: solid transparent;

content: " ";

height: 0;

width: 0;

position: absolute;

pointer-events: none;

}

.ol-popup:after {

border-top-color: white;

border-width: 10px;

left: 48px;

margin-left: -10px;

}

.ol-popup:before {

border-top-color: #cccccc;

border-width: 11px;

left: 48px;

margin-left: -11px;

}

.ol-popup-closer {

text-decoration: none;

position: absolute;

top: 0px;

right: 8px;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值