<commit_before>import { CRS } from 'leaflet';
import qs, { StringifiableRecord } from 'query-string';

export function getOsmUrl(
  lat: number,
  lon: number,
  zoom: number,
  includePoint?: boolean,
): string {
  return includePoint
    ? `https://www.openstreetmap.org/#map=${Math.min(zoom, 19)}/${lat.toFixed(
        5,
      )}/${lon.toFixed(5)}`
    : `https://www.openstreetmap.org/?mlat=${lat}&mlon=${lon}&zoom=${zoom}`;
}

export function getZbgisUrl(lat: number, lon: number, zoom: number): string {
  return `https://zbgis.skgeodesy.sk/mkzbgis?bm=zbgis&z=${zoom}&c=${lon},${lat}`;
}

// TODO to separate file
export function getHikingSkUrl(
  lat: number,
  lon: number,
  zoom: number,
  includePoint?: boolean,<commit_msg>fixed opening in ZBGIS (fixes #602)<commit_after>import { CRS } from 'leaflet';
import qs, { StringifiableRecord } from 'query-string';

export function getOsmUrl(
  lat: number,
  lon: number,
  zoom: number,
  includePoint?: boolean,
): string {
  return includePoint
    ? `https://www.openstreetmap.org/#map=${Math.min(zoom, 19)}/${lat.toFixed(
        5,
      )}/${lon.toFixed(5)}`
    : `https://www.openstreetmap.org/?mlat=${lat}&mlon=${lon}&zoom=${zoom}`;
}

export function getZbgisUrl(lat: number, lon: number, zoom: number): string {
  return `https://zbgis.skgeodesy.sk/mkzbgis?pos=${lat},${lon},${zoom}`;
}

// TODO to separate file
export function getHikingSkUrl(
  lat: number,
  lon: number,
  zoom: number,
  includePoint?: boolean,
{'fraction_non_alphanumeric': 0.18022864828513785, 'fraction_numerical': 0.007397444519166106, 'mean_word_length': 4.470588235294118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1425186', 'n_tokens_mistral': 541, 'n_tokens_neox': 533, 'n_words': 112}