Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map zooms out unnecessarily when focusing on a location #209

Open
2 tasks
krizpoon opened this issue Apr 7, 2020 · 0 comments
Open
2 tasks

Map zooms out unnecessarily when focusing on a location #209

krizpoon opened this issue Apr 7, 2020 · 0 comments

Comments

@krizpoon
Copy link

krizpoon commented Apr 7, 2020

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...

    • [ x ] bug report
    • feature request
    • support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?
    A bug. (I would say an enhancement but that seems not to be an option here)

  • What is the current behavior?

When a location is clicked, the map zooms to level 15 disregarding current zoom level.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
  1. Click on a location
  2. Zoom in closer
  3. Click on another location
  • What is the expected behavior?

The map should focus on the new location without zooming out.

  • What is the motivation / use case for changing the behavior?

When user zooms in a location, the user is interested in the surrounding area. When he clicks on a nearby location, the map shouldn't zoom out.

Since the high risk locations is dense already, zooming out will present the users with even denser locations. User often has to zoom back in.

  • Please tell us about your environment:

    • Version: 0.1.0
    • Browser: Chrome Version 80.0.3987.149 (Official Build) (64-bit)
    • Language: [all | TypeScript X.X | ES6/7 | ES5 | Dart]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Currently the max zoom level is set at 15 when clicking on a location. Suggest to use option like:

{
  maxZoom: Math.max(15, this.map.getZoom())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant