Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set custom marker border and border-radius? #780

Open
Janka55 opened this issue Aug 9, 2021 · 1 comment
Open

How to set custom marker border and border-radius? #780

Janka55 opened this issue Aug 9, 2021 · 1 comment

Comments

@Janka55
Copy link

Janka55 commented Aug 9, 2021

I need to set border-radius: 50% and set a border for my marker's custom icon.

<gmap-map ...>
  <gmap-marker v-for="item in group" title="test" icon="item.icon" position=“item.position” />
</gmap-map>

<script>
  export default {
    data() {
      return {
        group: [
          { position: { ... }, icon: { url: 'A' } },
          { position: { ... }, icon: { url: 'B' } },
          { position: { ... }, icon: { url: 'C' } },
          ...
        ]
      }
    }
  }
</script>

<style lang="less">
  div[title="test"] > img {
    border-radius: 50%;
    border: 1px solid white;
  }
</style>

I try to use 'title' to set my img style, but it works not I want. And I try to find the DOC but I find no api to support it.

@Janka55
Copy link
Author

Janka55 commented Aug 9, 2021

I think some other css style will also meet this problem. It will not work when I try to bind a style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant