This was put together to help on a query about selecting different actions when clicking on different parts of an image- like an 'image map' on a website. Not a finished program...
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