Icons placement - Available methods to place icons on preferred anchor?

Icons on OneMap

Hi,

In above map, I had placed 2 icons [school.gif and marker.png] on the same location [271008 and 271004]. At present, both icons are aligned on the top.

However I would like marker.png to be placed such that the marker tip are several lat degree up instead …

Is there some align method whereby I can pull to to place the marker differently [like bottom right corner or bottom left corner to be placed on the lat lng]? Other than offset with latitude degree?

I am using following method to place the icon.

data.push({type:“Feature”,properties:{“NAME”:“CC4”,“DESCRIPTION”:“This is a CC4”,“ICON”:"…/marker-icon.png"},geometry:{type:“Point”,coordinates:[103.795646462312,1.30796826360554]}});

Thanks

Oops, indeed sorry, it’s a leaflet question rather than one map.

Now I had used a square icon [20x20] instead, and above posed no issue. However it would be good to know how one can overcome such problem.

Hello,

There are 2 ways to go about this issue.

If these markers are from the same layer, you can choose to cluster them together.

Here is a library that is being widely used by the community,

Second, you can segregate them into overlays if these markers are from different layers.
This is how you control the layers.

URL: https://leafletjs.com/examples/layers-control/