mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
Merge pull request #117 from mapcraftlabs/fix/find-tile-bug
Fix bug in find_tiles in the python V3 code
This commit is contained in:
@@ -85,7 +85,7 @@ def tileid_to_zxy(tile_id):
|
|||||||
def find_tile(entries, tile_id):
|
def find_tile(entries, tile_id):
|
||||||
m = 0
|
m = 0
|
||||||
n = len(entries) - 1
|
n = len(entries) - 1
|
||||||
while m < n:
|
while m <= n:
|
||||||
k = (n + m) >> 1
|
k = (n + m) >> 1
|
||||||
c = tile_id - entries[k].tile_id
|
c = tile_id - entries[k].tile_id
|
||||||
if c > 0:
|
if c > 0:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user