Forum > Packages and Libraries

Any Lazarus-compatible map library for using maps from Google/Bing/any other?

<< < (3/3)

blankname:
Shouldn't it be like looping to the opposite edge of the map, or something like this? Or maybe it's not cost-effective?

wp:
There are several possibilities:
/1/ Repaint the background when the outer-most edges come into view.
/2/ Continue with the first horizontal tile when the right edge of the right-most tile comes into view, and vice versa. But what with vertical panning? It feels strange to me as a non-geographer that panning below the south pole jumps to the north pole...
/3/ Prohibit panning beyond the outer-most edges.

The best solution probably is a combination of /3/ and /4/: Periodic panning in horizontal direction and restricted panning in vertical direction. In case of very low magnification when the map window is larger than the entire map probably /1/ will have to be used.

Patches are welcome.

loaded:
Dear wp master,

--- Quote from: wp on January 06, 2022, 02:57:03 pm ---The mapviewer loads predefined png images of - I think - 512x256 pixels from the servers specified. At the lowest zoom level, the png image covers the entire world, and the display consists of one single bitmap. So, when your window is larger than 512x256 the map will be surrounded by a white border in this case.

--- End quote ---

All views on tile type maps are 256x256.
There is never a single image. Actually, the Zoom ratio is the number of tiles. So if the zoom value is Z=1, then 2^(Z*2) ->2 Horizontal x 2 Vertical is made up of 4 tiles.

The biggest problem in LazMapViewer is the speed problem. ;
On a 1920x1080 resolution screen, there will be approximately 45~55 tiles. This problem manifests itself clearly when downloading them.

wp:

--- Quote from: loaded on January 06, 2022, 06:57:07 pm ---All views on tile type maps are 256x256.
There is never a single image. Actually, the Zoom ratio is the number of tiles. So if the zoom value is Z=1, then 2^(Z*2) ->2 Horizontal x 2 Vertical is made up of 4 tiles.

--- End quote ---
Thanks for correcting me. I noticed that after posting when I looked at the mapviewer demo again.


--- Quote from: loaded on January 06, 2022, 06:57:07 pm ---The biggest problem in LazMapViewer is the speed problem. ;
On a 1920x1080 resolution screen, there will be approximately 45~55 tiles. This problem manifests itself clearly when downloading them.

--- End quote ---
I do know... It gets a bit faster, though once the required tiles already have been loaded into the image cache. And I try to avoid full-screen maps.

loaded:

--- Quote from: wp on January 06, 2022, 07:15:09 pm ---Thanks for correcting me. I noticed that after posting when I looked at the mapviewer demo again.

--- End quote ---

Actually, I should thank you, Grand Master.
Everything I know about it, I learned from what you wrote.

Navigation

[0] Message Index

[*] Previous page

Go to full version