# Im stuck with the MapboxGL case cluster.layout.text\_field

**URL:** <https://community.weweb.io/t/im-stuck-with-the-mapboxgl-case-cluster-layout-text-field/14114>\
**Category:** How do I?\
**Tags:** design, map\
**Created:** [October 23, 2024, 5:31pm UTC](https://community.weweb.io/t/im-stuck-with-the-mapboxgl-case-cluster-layout-text-field/14114 "2024-10-23T17:31:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://community.weweb.io/u/eric)\
**Post date:** [October 23, 2024, 5:31pm UTC](https://community.weweb.io/t/im-stuck-with-the-mapboxgl-case-cluster-layout-text-field/14114/1 "2024-10-23T17:31:46Z")

</div>

in cluster point, the layout.text field I want to render a value\_text  
but as docs, it **cant** set the value\_text to the cluster.properties  
and mapboxGL said, the layout **cant** access to the cluster.feature\_state

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/489bc6a0f1ef5c5f8a2ba2b843d319fe52bd0aaf.png)  
in my case, value\_text = total of ALL current\_cluster.leaves.properties.prop\_data.items.length  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/baf01c5c40d1a3f65c738b5d076f682c7e31d5d1.png)  
After calculated it, I dont know how to let the cluster.layout.text\_field render it

so, how can I display the text\_field is the value\_text?  
Thank you!

---

<div class="post-metadata">

**Author:** ![DanielL](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/daniell/32/13398_2.png) [@DanielL](https://community.weweb.io/u/DanielL)\
**Post date:** [October 31, 2024, 2:05am UTC](https://community.weweb.io/t/im-stuck-with-the-mapboxgl-case-cluster-layout-text-field/14114/2 "2024-10-31T02:05:37Z")

</div>

Hi @eric 👋

Sorry but this is not a WeWeb issue. I’d recommend you contact Mapbox. We don’t encourage this type of custom code in the editor.

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://community.weweb.io/u/eric)\
**Post date:** [October 31, 2024, 5:31am UTC](https://community.weweb.io/t/im-stuck-with-the-mapboxgl-case-cluster-layout-text-field/14114/3 "2024-10-31T05:31:07Z")

</div>

thanks @DanielL  
I saw and understand it  
so Im thinking another way  
and blocked shown here  
could you check it?

> [@Custom markers on mapboxgl](https://community.weweb.io/t/custom-markers-on-mapboxgl/14228/2):
>
> Hi @Joyce @Alexis @DanielL I research and found, weweb is render the mapboxgl as a canvas so I cant handle or get the map\_element per id or handle several logic per document(wwLib.getFrontDocument()) here is 1 example about I using it const mapContainer = wwLib.getFrontDocument().getElementById("mapboxgl-canvas"); OR wwLib.getFrontDocument() .querySelectorAll(".mapboxgl-marker") .forEach((customMarker) =\> customMarker.remove and all the marker when pass to the map, they are always …
