Hello ! I am currently using Jmix version 2.3.4 and trying to modify the style of a geometry displayed on a map using the setStyleProvider method. I have configured layerSource to display a specific marker icon
However, the custom style does not apply, and the default style remains visible on the map.
<maps:vector id=“networkFeatureStructuresLayer” >
<maps:dataVectorSource id=“networkFeatureStructuresLayerSource”
dataContainer=“networkFeatureStructuresDc” property=“geometry”/>
</maps:vector>
private fun initStyleSource() {
networkFeatureStructuresLayerSource.setStyleProvider { location →
Style()
.withImage(
IconStyle()
.withSrc(“map-icons/point-marker.png”)
.withScale(0.5)
.withAnchorOrigin(IconOrigin.BOTTOM_LEFT)
.withAnchor( Anchor(0.49, 0.12))
)
}
@Subscribe
private fun onInit(event: InitEvent) {
initStyleSource()
}
open class NetworkFeatureStructure : NetworkFeature(){
@Column(name = "GEOMETRY")
var geometry: Point? = null
}