Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 636 Bytes

readme.md

File metadata and controls

29 lines (23 loc) · 636 Bytes

Typescript flavoured library providing access to the Maptiler Geocoding service.

npm i maptiler-geocoder-node
import { config } from 'dotenv'
import { resolve } from 'path'
import { createClient } from 'maptiler-geocoder-node'

config({
  path: resolve(__dirname, '../.env')
})

const client = new createClient({
  key: process.env.key
})

// Single query example
const query = async () => {
  return await client.query('Mory 8, Warsaw 01-330')
}

// Queue query example
const queue = async () => {
  return await client.queue(['Mory 8, Warsaw 01-330', '1756 Naud St, Los Angeles', 'failed address'])
}