0

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.

Rantiev
  • 2,121
  • 2
  • 32
  • 56
  • 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 Dec 27 '19 at 03:49

1 Answers1

1

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

AndrewHarvey
  • 2,867
  • 11
  • 21