# Put a Label inside a Marker

**URL:** <https://forum.woosmap.com/t/put-a-label-inside-a-marker/110>\
**Category:** Ask the community\
**Tags:** store-locator\
**Created:** [November 18, 2021, 8:15am UTC](https://forum.woosmap.com/t/put-a-label-inside-a-marker/110 "2021-11-18T08:15:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@Hamza](https://forum.woosmap.com/u/Hamza)\
**Post date:** [November 18, 2021, 8:15am UTC](https://forum.woosmap.com/t/put-a-label-inside-a-marker/110/1 "2021-11-18T08:15:42Z")

</div>

Hi, I’m trying to put a label inside a Marker but it seems not working. So I want to know please if it’s possible to do that or i have juste o load many images peer case ?

I’m tried many times to use Marker.setLabel() but it does not work…

Any help will be appreciated.

Best regards.

---

<div class="post-metadata">

**Author:** ![gael](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.woosmap.com/gael/32/3_2.png) [@gael](https://forum.woosmap.com/u/gael)\
**Post date:** [November 18, 2021, 9:30am UTC](https://forum.woosmap.com/t/put-a-label-inside-a-marker/110/2 "2021-11-18T09:30:31Z")

</div>

> **Update.** Marker labels are supported now. Set `label` on the marker and position it with `labelOrigin` on the icon. See [Marker labels](https://developers.woosmap.com/products/map-api/guides/markers/#marker-labels) and the [Marker Label sample](https://developers.woosmap.com/js-samples/marker-label/). The pre-built image workaround below is no longer needed.

Hello @Hamza, thanks for joining the Woosmap Community.

Are you using [Woosmap Map JS API](https://developers.woosmap.com/products/map-api/reference/1.0/#MarkerOptions)?  
If this is the case, I’m sorry but labels on Markers are not supported yet.

You’ll need to pre-build the marker images with your label like this icons: ![1](https://europe1.discourse-cdn.com/flex013/uploads/woosmap/original/1X/bd0689f5c7a45af8b858edf9d1169f48c9dae18a.png) ![2](https://europe1.discourse-cdn.com/flex013/uploads/woosmap/original/1X/0f7989fff154a33a9effc964cb5a731b89a52496.png) ![3](https://europe1.discourse-cdn.com/flex013/uploads/woosmap/original/1X/7f153df84447724c004b4792e8a57eb87869f609.png)

```javascript
marker = new woosmap.map.Marker({
  position: {lat:30.064742, lng:31.249509},
  icon: {
    url: 'https://images.woosmap.com/1.png',
    scaledSize: {
      height: 27,
      width: 27
    }
  }
});

```

Here is the [woosmap.map.Marker](https://developers.woosmap.com/products/map-api/reference/1.0/#woosmap.map.Marker) reference class with currently available Methods and MarkersOptions.

Thanks for your feedback.  
Please let me know if you require further information.

---

<div class="post-metadata">

**Author:** ![Hamza](https://avatars.discourse-cdn.com/v4/letter/h/a88e57/32.png) [@Hamza](https://forum.woosmap.com/u/Hamza)\
**Post date:** [November 18, 2021, 10:04am UTC](https://forum.woosmap.com/t/put-a-label-inside-a-marker/110/3 "2021-11-18T10:04:45Z")

</div>

Hello @gael, thanks for your response and your help 🙂

We are using Woosmap Map JS API, so it will not be possible to associate a label to a Marker.

So we will use a CDN to store all images which are numbered and use them inside the Marquer as an icon url…

Thank you again.

Have a nice day.

Hamza

---

<div class="post-metadata">

**Author:** ![gael](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.woosmap.com/gael/32/3_2.png) [@gael](https://forum.woosmap.com/u/gael)\
**Post date:** [August 3, 2022, 2:01pm UTC](https://forum.woosmap.com/t/put-a-label-inside-a-marker/110/4 "2022-08-03T14:01:09Z")

</div>

Hello @Hamza,  
9 months later, we finally released the Marker Labels feature 😉

```javascript
const iconMarker = {
    labelOrigin: new window.woosmap.map.Point(12, 12),
    url: "https://images.woosmap.com/marker-red.png"
};
const marker = new window.woosmap.map.Marker({
    position: myMap.getCenter(),
    icon: iconMarker,
    label: {
        text: "1",
        color: "white"
    },
    map: myMap
});

```

The following example displays labeled markers when you click on the map:

https://codesandbox.io/embed/marker-label-w7sj5y?module=&hidedevtools=1&hidenavigation=1&theme=light&view=preview

Developers documentation guides and reference are updated with this latest feature.

> **[Add Markers](https://developers.woosmap.com/products/map-api/guides/markers/#marker-labels)**
>
> Display markers to identify locations on Woosmap Map.

Best regards.
