开发者

Convert Google Maps coordinates to pixels

开发者 https://www.devze.com 2023-02-05 10:16 出处:网络
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 s

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

精彩评论

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

关注公众号