How to set mapbox static map marker offset?

860 views Asked by At

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

There are 1 answers

0
AndrewHarvey On

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