Skip to content

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

@Janka55

Description

@Janka55

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions