eric
October 23, 2024, 5:31pm
1
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
in my case, value_text = total of ALL current_cluster.leaves.properties.prop_data.items.length
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!
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.
eric
October 31, 2024, 5:31am
3
thanks @danlopes
I saw and understand it
so Im thinking another way
and blocked shown here
could you check it?
Hi @Joyce @Alexis @danlopes
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 …