Comments (7)
the library download all tiles for all zoom number
That's not quite so. Map is smart enough to download only a fragment (current viewport + some border around it). You can check it with demo and a zoom level >=4. But yes, all queued tiles remain even if you change zoom further.
Allow you to change zoom or pan without waiting for the download to finish (now I need wait for it to finish download)
I'm not sure I understand you. Map is completely responsible even if it has no tile image. Do you mean prioritizing tiles to those which fall into current viewport?
if the user change view (zoom and/or pan) while it is downloading tiles, stop the old download (of tiles no longer needed) and download the ones actually needed for the new view
Yep, that's possible and seems not hard to implement
from delphi_osmmap.
The simplest is done, two are in TODO
- Cancel zoom level if another is requested
- Prioritize tile requests to current viewport (additional parameter to TNetworkRequestQueue.RequestTile - but TQueue seems not having a way to do so)
- Only request tiles after scrolling stays for some time (skip requesting all ones which were scrolled by quickly)
from delphi_osmmap.
I'm not sure I understand you. Map is completely responsible even if it has no tile image. Do you mean prioritizing tiles to those which fall into current viewport?
If component download tiles it is difficult to move the map.
from delphi_osmmap.
Если Вы хотите, чтобы быстрее загружалась видимая часть карты, то измените в файле "osm.mapcontrol.pas" константы на: CacheImageDefTilesH=1;
CacheImageDefTilesV=1;
CacheMarginSize=1;
Я сделал так, отображает необходимую часть карты значительно быстрее.
from delphi_osmmap.
If component download tiles it is difficult to move the map.
This is weird. Download is almost completely untied with map drawing. It should scroll smoothly regardless of the available tiles displaying stubs instead. What OS you're on? What happens if you disable network (or set non-existing proxy address)?
For now you can shrink the cache as Alex said, this will reduce the number of tiles downloaded for each single view. Later this trick will become less actual (when tile prioritizing is done)
from delphi_osmmap.
@array81 I just checked fast panning with Demo. All glitches come from line Log(Format('Queued request from inet %s', [TileToStr(Tile)]));
in TMainForm.mMapDrawTile
. Disabling it makes panning smooth, both with already cached tiles and requested from inet.
from delphi_osmmap.
Prioritizing done in 9f6e2dd
from delphi_osmmap.
Related Issues (20)
- Zoom by mouse wheel and hide scrollbars HOT 4
- Proposal for project modification HOT 11
- TO-DO List
- firemonkey support HOT 1
- Error HOT 2
- TileProvider small modifications HOT 4
- Popup menu HOT 2
- Opacity HOT 2
- Draw polygon HOT 2
- How to repaint the OSM.MapControl and how to find canvas coordinate in OnDrawTile HOT 2
- Polygone area HOT 4
- Import KLM file for add polygones by tracks HOT 11
- show a spécific region of a map HOT 1
- Trunk to Stable ? HOT 2
- zoom Error HOT 1
- TileURL
- OSMMap and Lazarus 3.00 HOT 3
- Zoom position HOT 1
- License HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delphi_osmmap.