Git Product home page Git Product logo

Comments (6)

phil-applegate avatar phil-applegate commented on August 22, 2024

The zoom levels I have added are as follows:

mapView.addZoomLevel(500,1500, filepath,downsample,500,500); mapView.addZoomLevel(1000,3000, filepath,downsample,500,500); mapView.addZoomLevel(2000,6000, filepath,downsample,500,500); mapView.addZoomLevel(3000,9000, filepath,downsample,500,500); mapView.addZoomLevel(4000,12000, filepath,downsample,500,500);

Does the fact the relationship between the zoom levels matter? I've noticed that if I remove the 3000,9000 level the problem no longer appears.

Cheers,
Phil

from mapview.

moagrius avatar moagrius commented on August 22, 2024

the widget expects each successive zoom level to be twice as large as the one preceding it. it shows the largest at 1.0 to 0.500001 scale, then the next largest at 0.5 to 0.250001, etc. That's why removing the 3000,9000 set "fixes" it - since that's the only one that's not twice as large as the previous. LMK if that doesn't make sense.

from mapview.

fcapano avatar fcapano commented on August 22, 2024

I also faced this issue and couldn't understand the cause until I read this issue.
In my opinion this behavior doesn't make much sense, as it leads developers to think that there is an issue with the tiled images.
I would expect either that addZoomLever throws an exception if the zoomLevels are not "good", or that any zoom level can be added (which would be much better in my opinion).
Either way, the error should probably not be treated "silently".

from mapview.

moagrius avatar moagrius commented on August 22, 2024

there's no way to determine if a zoom level is "good" or not, and the dimensions don't have to be exactly half/double. On most of the apps I've produced with this widget, the zoom level dimensions vary somewhat, which generally ends up clipping or expanding the bottom and right borders, but you might have different aspect ratios on different zoom levels, for example, which is supported. There's also the ability to display marker sets for specific zoom levels.

In general, I don't consider this behavior to be an error, although the docs should probably be updated to state this clearly.

from mapview.

phil-applegate avatar phil-applegate commented on August 22, 2024

Perfect - I've updated my implementation. I really appreciate you confirming this for me.

Thanks

from mapview.

moagrius avatar moagrius commented on August 22, 2024

@phil-applegate TileView has been released and would support the levels as you have them listed in #56 (comment) (although the signature is a little different now). TileView does not require "bit-shifted" levels, and detail levels can be added for any float value (e.g., 0.25, 0.5, 0.75, 1.0, 2.0).

from mapview.

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.