Track bugfix
This commit is contained in:
13
osm.pb
13
osm.pb
@@ -309,8 +309,8 @@ Module OSM
|
|||||||
Protected mapHeight.l = Pow(2,OSM\Zoom+8)
|
Protected mapHeight.l = Pow(2,OSM\Zoom+8)
|
||||||
Protected x1.l,y1.l
|
Protected x1.l,y1.l
|
||||||
|
|
||||||
;Protected deltaX = OSM\Position\x - Int(OSM\Drawing\x) * OSM\TileSize ;Get the position into the tile
|
Protected deltaX = OSM\Position\x - Int(OSM\Drawing\x) * OSM\TileSize ;Get the position into the tile
|
||||||
;Protected deltaY = OSM\Position\y - Int(OSM\Drawing\y) * OSM\TileSize
|
Protected deltaY = OSM\Position\y - Int(OSM\Drawing\y) * OSM\TileSize
|
||||||
|
|
||||||
; get x value
|
; get x value
|
||||||
x1 = (*Location\Longitude+180)*(mapWidth/360)
|
x1 = (*Location\Longitude+180)*(mapWidth/360)
|
||||||
@@ -329,8 +329,8 @@ Module OSM
|
|||||||
mercN = Log(Tan((#PI/4)+(latRad/2))) ;
|
mercN = Log(Tan((#PI/4)+(latRad/2))) ;
|
||||||
y2 = (mapHeight/2)-(mapWidth*mercN/(2*#PI));
|
y2 = (mapHeight/2)-(mapWidth*mercN/(2*#PI));
|
||||||
|
|
||||||
*Pixel\x=GadgetWidth(OSM\Gadget)/2 - (x2-x1); + deltaX
|
*Pixel\x=GadgetWidth(OSM\Gadget)/2 - (x2-x1) - deltaX
|
||||||
*Pixel\y=GadgetHeight(OSM\Gadget)/2 - (y2-y1);+ deltaY
|
*Pixel\y=GadgetHeight(OSM\Gadget)/2 - (y2-y1) - deltaY
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
Procedure LoadGpxFile(file.s)
|
Procedure LoadGpxFile(file.s)
|
||||||
@@ -826,6 +826,7 @@ CompilerIf #PB_Compiler_IsMainFile
|
|||||||
SetGadgetText(#String_1, StrD(*Location\Longitude))
|
SetGadgetText(#String_1, StrD(*Location\Longitude))
|
||||||
ProcedureReturn 0
|
ProcedureReturn 0
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
;- Main
|
;- Main
|
||||||
If OpenWindow(#Window_0, 260, 225, 700, 571, "OpenStreetMap", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
|
If OpenWindow(#Window_0, 260, 225, 700, 571, "OpenStreetMap", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
|
||||||
|
|
||||||
@@ -876,8 +877,8 @@ CompilerIf #PB_Compiler_IsMainFile
|
|||||||
CompilerEndIf
|
CompilerEndIf
|
||||||
|
|
||||||
; IDE Options = PureBasic 5.42 LTS (Windows - x64)
|
; IDE Options = PureBasic 5.42 LTS (Windows - x64)
|
||||||
; CursorPosition = 331
|
; CursorPosition = 332
|
||||||
; FirstLine = 328
|
; FirstLine = 531
|
||||||
; Folding = -----
|
; Folding = -----
|
||||||
; EnableUnicode
|
; EnableUnicode
|
||||||
; EnableThread
|
; EnableThread
|
||||||
|
Reference in New Issue
Block a user