Tag: proj4js

墨卡托经度和纬度计算在英国的裁剪地图上的x和y

我有这个形象: http : //imgur.com/99tSz.png 。 英国地图(不包括南爱尔兰)。 我已经成功地设法获得了经度和纬度,并把英国的最左边的经度和最右边的经度绘制在这张地图上,并用它们来计算出在地图上的位置。 这是代码(用于Processing.js,但可以用作js或任何东西): // Size of the map int width = 538; int height = 811; // X and Y boundaries float westLong = -8.166667; float eastLong = 1.762833; float northLat = 58.666667; float southLat = 49.95; void drawPoint(float latitude, float longitude){ fill(#000000); x = width * ((westLong-longitude)/(westLong-eastLong)); y = […]