@christian-nja/geocoding

An agile tool to geocode addresses

Usage no npm install needed!

<script type="module">
  import christianNjaGeocoding from 'https://cdn.skypack.dev/@christian-nja/geocoding';
</script>

README

Simple usage:

const geocoder = new Geocoder();
const address_1 = new Address({
    q: "Paris France",
});
const address_2 = new Address({
    q: "New York",
});
geocoder.resolveCoordinates([address_1, address_2]).then(
    (results) => { console.log(results)
    };

Pay attention default services may have limitation. To provide new service do:

import { NodeGeocoder, Geocoder } from "geocoding";

const geocoder = new Geocoder(
    new NodeGeocoder({
        provider: "yourprovider",
    })
);