开发者

Convert Google Maps coordinates to pixels

I 开发者_运维百科have simple list of Google Maps coordinates (range 44-46 lat. and 15-17 lon.) and I have a screen size 1280x720. How can I translate those coordinates (bunch of them) in this screen size so actually my top edge of the screen would respresent 46.000000, lower edge 44.000000, left edge 15.000000 and right edge 17.000000.


Keep it simple.

Map 2 longitude degrees to 1280 pixels = 640 pixels / longitude degree

Map 2 latitude degrees to 720 pixels = 360 pixels /latitude degree

The rest is simple math.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜