|
Post by angelo2449 on Jul 11, 2019 23:15:41 GMT -5
Hi guys,
I would like to write a program that uses Earth as a base.
I would like to be able to define points and extract the geographical coordinates (Lat, Lon). Does anyone have an idea to get started?
Thank you.
|
|
|
Post by tsh73 on Jul 12, 2019 4:57:51 GMT -5
|
|
|
Post by tenochtitlanuk on Jul 12, 2019 10:44:05 GMT -5
Here's a quick demo- you need to copy the code to LB editor and the image to the same folder.. Click on the map and see screen coordinates Longitudes on screen go 68 to 227- you need to scale these to -180 to +180 Latitudes 362 to 95 represent -60 to 60 degrees. nomainwin
WindowWidth =1000 WindowHeight = 550
graphicbox #w.gb1, 4, 4, 939, 450 textbox #w.tb1, 4, 460, 100, 30
open "World Map" for window as #w
#w "trapclose quit"
loadbmp "scr", "earthMap.bmp"
#w.gb1 "down ; drawbmp scr 1 1" #w.gb1 "flush" #w.gb1 "when leftButtonDown tellMe"
wait
sub tellMe h$, x, y scan #w.tb1 str$( MouseX) +" " +str$( MouseY) end sub
sub quit h$ close #w end end sub
|
|