Change mapping from zoom levels to geohash precision#8000
Merged
thomasneirynck merged 3 commits intoelastic:masterfrom Aug 17, 2016
Merged
Change mapping from zoom levels to geohash precision#8000thomasneirynck merged 3 commits intoelastic:masterfrom
thomasneirynck merged 3 commits intoelastic:masterfrom
Conversation
7eeadc4 to
6a7e8c3
Compare
Contributor
Author
- the precision level does not grow as quickly as previously. This caused circles to look really small on some zoom levels. The determination of the precision is now based on a heuristic based on the min-width of the geohash-cell for a given zoom level - add unit tests (previously absent)
6a7e8c3 to
273b228
Compare
| for (let zoom = 0; zoom <= 21; zoom += 1) { | ||
| const worldPixels = 256 * Math.pow(2, zoom); | ||
| zoomPrecision[zoom] = 1; | ||
| for (let precision = 2; precision <= 12; precision += 1) { |
Contributor
There was a problem hiding this comment.
does it make sense to use config.get('visualization:tileMap:maxPrecision') here instead of 12?
Contributor
Author
There was a problem hiding this comment.
actually, it does. I missed that setting, thx!
Contributor
|
nitpicky comment above, otherwise this LGTM. |
82bf5be to
75c347b
Compare
Contributor
|
LGTM |
| if (vis.hasUiState()) { | ||
| currZoom = parseInt(vis.uiStateVal('mapZoom')); | ||
| } | ||
| const autoPrecisionVal = zoomPrecision[currZoom >= 0 ? currZoom : parseInt(vis.params.mapZoom)]; |
Contributor
There was a problem hiding this comment.
You should give parseInt a radix of 10, here and a couple lines up.
4f3d8ff to
6309855
Compare
Contributor
Contributor
|
LGTM! |
airow
pushed a commit
to airow/kibana
that referenced
this pull request
Feb 16, 2017
…cision Change mapping from zoom levels to geohash precision Former-commit-id: b98339b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Addresses #7882, by improving the mapping from zoom level to geohash precision.
I split this off from #7915. This PR is stripped from the implementation changes for scaled_circles. That was only tangentially related to the issue, and cluttered the PR.