我使用了google-map的infowindow,但我不能管理infowindow填充,现在我的标签看起来像

但是我需要黑色内容div对齐所有白色标签长度,我在文档中读到,我不能自定义谷歌infoWindow,他们提供使用弹出,但我需要显示它只在悬停。在项目中,我使用vue.js,也许中小企业有经验,什么和如何使用vue代替infoWindow?
getDevelopmentInInfoWindow(entity, marker) {
window.axios.get(`/development-map/development/${entity.id}`)
.then((response) => {
this.instance.$props.entity = response.data;
this.instance.$mount();
this.infoWindow.setContent(this.instance.$el.innerHTML);
this.infoWindow.open(this.map, marker);
})
.catch((error) => console.log(error));
},
initializeInfoWindow() {
let InfoWindow = Vue.extend(InfoWindowComponent);
this.instance = new InfoWindow({
propsData: {
entity: null,
}
});
this.infoWindow = new this.google.maps.InfoWindow({
shadow: false,
});
},发布于 2019-03-08 12:19:37
您可以尝试使用custom popup
如果你想在infowindow风格中进行调整,这是另一种选择,因为infowindow类不提供定制,所以不建议改变infowindow类的风格。
文档中还有一个示例供您参考。
https://stackoverflow.com/questions/54938729
复制相似问题