Point Placement on Mapbox map is incorrect

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Posts: 1
Joined: 2020-02-25T09:47:03-07:00
Authentication code: 1152

Point Placement on Mapbox map is incorrect

Post by mkendall »

I am try to get an exact placement on a mapbox map, but it is a little off- has anyone done similar and know what could be the problem?

//calculate position om Map
int pixx = 0;
int pixy = 0;
TileSystem.LatLongToPixelXY(ptLat, ptLng, zoom, out pixx, out pixy);

//Adjustment value center of map
s = cy - (sizey / 2);
w = cx - (sizex / 2);

//Where to place image
int locy = pixy - s;
int locx = pixx - w;

User avatar
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Point Placement on Mapbox map is incorrect

Post by fmw42 »

What does this have to do with ImageMagick? Please put this in context with Imagemagick.

Please also provide your full command line and your version of ImageMagick and platform.