return REVERSE_MAX_RANKS[max(0, min(18, zoom))]
-FEATURE_TYPE_TO_RANK: Dict[Optional[str], Any] = {
+FEATURE_TYPE_TO_RANK: Dict[Optional[str], Tuple[int, int]] = {
'country': (4, 4),
'state': (8, 8),
'city': (14, 16),
)]
def extract_coords_from_query(query: str) -> Tuple[str, Optional[float], Optional[float]]:
- """ Look for something that is formated like a coordinate at the
+ """ Look for something that is formatted like a coordinate at the
beginning or end of the query. If found, extract the coordinate and
return the remaining query (or the empty string if the query
consisted of nothing but a coordinate).