个性化 Google 地图徽章

发布于 2024-12-07 19:26:54 字数 189 浏览 2 评论 0原文

我想在 Google 地图上个性化位置徽章(使用 API)。我知道可以使用 CSS 或图像更改徽章的外观。但我怎样才能做到这一点呢?

这就是我想要的: 在此处输入图像描述

小矩形是普通视图,大矩形是单击视图(带有信息)。谢谢 !!!

I would like to personalize the position badge on a Google Map (with API). I know it's possible to change the appeareance of the badge with CSS or image. But how I can do that ?

This is what I want : enter image description here

The small rectangle is the normal view, and the big rectangle is the clicked view (with informations). Thanks !!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

霓裳挽歌倾城醉 2024-12-14 19:26:54

“大矩形”和“小矩形”都是信息窗口。之前曾在这里询问过样式信息窗口:
设置 Google 地图信息窗口的样式

您需要有一个事件侦听器,因此最初的小信息窗口是全部显示在负载上。然后,当您单击某个点或信息窗口时,就会显示大信息窗口。

The 'big rectangle' and 'small rectangle' are both infowindows. Styling infowindows has been asked here before:
Styling Google Maps InfoWindow

You'd need to have an event listener, so initially the small infowindows are all displayed on load. Then when you click on a point or on an infowindow, you then show the large infowindow.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文