Coder Social home page Coder Social logo

Comments (7)

Fr0sT-Brutal avatar Fr0sT-Brutal commented on July 30, 2024

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.

Fr0sT-Brutal avatar Fr0sT-Brutal commented on July 30, 2024

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.

array81 avatar array81 commented on July 30, 2024

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.

AlexHausauer avatar AlexHausauer commented on July 30, 2024

Если Вы хотите, чтобы быстрее загружалась видимая часть карты, то измените в файле "osm.mapcontrol.pas" константы на: CacheImageDefTilesH=1;
CacheImageDefTilesV=1;
CacheMarginSize=1;
Я сделал так, отображает необходимую часть карты значительно быстрее.

from delphi_osmmap.

Fr0sT-Brutal avatar Fr0sT-Brutal commented on July 30, 2024

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.

Fr0sT-Brutal avatar Fr0sT-Brutal commented on July 30, 2024

@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.

Fr0sT-Brutal avatar Fr0sT-Brutal commented on July 30, 2024

Prioritizing done in 9f6e2dd

from delphi_osmmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.