0
votes

If marker shape is a drop we need to set it's offset, there is no sense setting anchor point to center for eccentric markers.

I can't find any options to control mapbox static image map marker offset in mapbox API. enter link description here

The only idea comes to my head is detecting lng/lat with some offset. For example we can initialize hidden mapbox-gl-js map 100px/100px sized and use project->update pixels offset->unproject to get lng lat back, or somehow else.

1
You wouldn't need to initialise a map you could just use the spherical Mercator projection library directly. Search on the Mapbox GitHub account and there should be one there.AndrewHarvey

1 Answers

1
votes

You could just pad your marker image with white space so the tip is at the image centre.