Giter Club home page Giter Club logo

muni-international-students's People

Contributors

dajanasnopkova avatar sleitgeb avatar

Watchers

 avatar

muni-international-students's Issues

Layers disappear on a touchscreen device

Even when using a non-zero zoomSnap for L.map, the zoom level is not always snapped on a touchscreen device. With the following setup:

  • zoomSnap: 0.1,
  • layerA.min_zoom = -12,
  • layerB.max_zoom = -12.1,

If the user zooms using the pinch gesture to e.g. -12.07, all layers disappear (since the zoom is between the thresholds), and no zoom snap occurs. The user can still zoom out or in, and the layers reappear.

Two possible fixes come to mind:

  1. set the zoom thresholds for consecutive layers to very similar values, e.g.:
  • layerA.min_zoom = -12,
  • layerB.max_zoom = -12.0000000001,
  1. change the comparison in the leaflet-zoom-show-hide plugin, so that layers A and B (layerA.min_zoom === layerB.max_zoom) don't overlap, roughly:
if (current_zoom_level >= layer.min_zoom && current_zoom_level < layer.max_zoom) {
  layer.addTo(this._layerGroup);
}

This would be preferably implemented using an initialization option in the plugin.

Map wrap

Choose suitable coordinate system and apply map wrap, so one can endlessly pan to the side...

Trigger higher zoom layer download when necessary

Delay downloading of the higher zoom data until necessary. The more detailed layer is shown at zoom 6 and higher currently. Try triggering the download at zoom 7 or higher. Also, don't restrict the zoom level of the more generalized layer until the detailed data is ready.

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.