Merge pull request #14 from djes/djes
Revert "Little tile loading bugfix"
This commit is contained in:
11
PBMap.pb
11
PBMap.pb
@@ -1025,7 +1025,7 @@ Module PBMap
|
|||||||
|
|
||||||
Procedure.i GetTileFromHDD(CacheFile.s)
|
Procedure.i GetTileFromHDD(CacheFile.s)
|
||||||
Protected nImage.i, LifeTime.i, MaxLifeTime.i = PBMap\Options\TileLifetime
|
Protected nImage.i, LifeTime.i, MaxLifeTime.i = PBMap\Options\TileLifetime
|
||||||
If FileSize(CacheFile) > 0
|
If FileSize(CacheFile) <> -1
|
||||||
;Manage tile file lifetime
|
;Manage tile file lifetime
|
||||||
If MaxLifeTime <> -1
|
If MaxLifeTime <> -1
|
||||||
LifeTime = Date() - GetFileDate(CacheFile, #PB_Date_Modified) ;There's a bug with #PB_Date_Created
|
LifeTime = Date() - GetFileDate(CacheFile, #PB_Date_Modified) ;There's a bug with #PB_Date_Created
|
||||||
@@ -1054,8 +1054,9 @@ Module PBMap
|
|||||||
Procedure.i GetTileFromWeb(TileURL.s, CacheFile.s)
|
Procedure.i GetTileFromWeb(TileURL.s, CacheFile.s)
|
||||||
Protected *Buffer
|
Protected *Buffer
|
||||||
Protected nImage.i = -1
|
Protected nImage.i = -1
|
||||||
Protected timg
|
Protected FileSize.i, timg
|
||||||
If ReceiveHTTPFile(TileURL, CacheFile)
|
FileSize = ReceiveHTTPFile(TileURL, CacheFile)
|
||||||
|
If FileSize > 0
|
||||||
MyDebug("Loaded from web " + TileURL + " as CacheFile " + CacheFile, 3)
|
MyDebug("Loaded from web " + TileURL + " as CacheFile " + CacheFile, 3)
|
||||||
nImage = GetTileFromHDD(CacheFile)
|
nImage = GetTileFromHDD(CacheFile)
|
||||||
Else
|
Else
|
||||||
@@ -2736,8 +2737,8 @@ CompilerIf #PB_Compiler_IsMainFile
|
|||||||
CompilerEndIf
|
CompilerEndIf
|
||||||
|
|
||||||
; IDE Options = PureBasic 5.60 (Windows - x64)
|
; IDE Options = PureBasic 5.60 (Windows - x64)
|
||||||
; CursorPosition = 1031
|
; CursorPosition = 2691
|
||||||
; FirstLine = 1020
|
; FirstLine = 2684
|
||||||
; Folding = -------------------
|
; Folding = -------------------
|
||||||
; EnableThread
|
; EnableThread
|
||||||
; EnableXP
|
; EnableXP
|
Reference in New Issue
Block a user