Commit 4aaaee78 by 潘建波

修改地图拉伸后出现空白问题

1 parent a0e307be
<template> <template>
<div> <div style="width:100%">
<div id="map" class="maps"></div> <div id="map" class="maps"></div>
<div id="popup" class="ol-popup"> <div id="popup" class="ol-popup">
<a <a
...@@ -444,8 +444,10 @@ export default { ...@@ -444,8 +444,10 @@ export default {
}, },
watch:{ watch:{
mapopen(){ mapopen(){
debugger setTimeout(()=> {
map.updateSize(); map.updateSize();
},1000)
// this.InitMap(); // this.InitMap();
} }
}, },
...@@ -466,7 +468,9 @@ export default { ...@@ -466,7 +468,9 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.maps{ .maps{
background:url("./map.png") background:url("./map.png");
width 100%
} }
.ol-control button{ .ol-control button{
display:none!important; display:none!important;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!