开发者

Javascript Canvas Lat Lng Plotting

I want to create a data visualization similar to this:

Javascript Canvas Lat Lng Plotting

...but开发者_如何学JAVA for the entire globe. The canvas size will be arbitrary but won't need to resize with the browser (I will set the width and height before I start plotting points). I need to figure out a way of converting latitude and longitude coordinates to points on the canvas. Does anyone know how to do it?


First of all you need to choose projection. Then you can use proper formula. Or you can just use existent solution like proj4js for example. This is JS port of well-known proj utility for working with various projections.

I would recommend to use Miller Projection for the visualizations on the whole globe. You can find formulas here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜