Rantiev
Rantiev

Reputation: 2242

How to set mapbox static map marker offset?

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.

Upvotes: 0

Views: 952

Answers (1)

AndrewHarvey
AndrewHarvey

Reputation: 3055

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

Upvotes: 1

Related Questions