Reputation: 1
I am new to backend development, and I am trying to use MapTiler's geocoding service to convert addresses into latitude and longitude (forward geocoding). My goal is to retrieve the latitude and longitude based on user input.
Initially, I attempted to use Mapbox, but it now requires credit card information. As an alternative, I decided to try MapTiler. However, when I tried using the MapTiler npm package, I encountered issues with both the CommonJS (CJS) and ECMAScript Module (ESM) methods of requiring the package. I have confirmed that the package is installed correctly.
Since I mostly use the require method and am not very familiar with the import method, I am having trouble resolving this issue. can you explain it .
Thank you for your help.
i first install the npm package, i just want to run the maptiler sdk to send the the forward geocoding. and get the output in lat and long if i put any location.
Upvotes: -1
Views: 22
Reputation: 1
Thank you for giving MapTiler service a try.
If you are using just backand for geocoding all you need is the MapTiler client library https://www.npmjs.com/package/@maptiler/client
It should be straight forward to get it installed and used, see https://docs.maptiler.com/client-js/geocoding/
Follow the Quickstart examples https://docs.maptiler.com/client-js/
Upvotes: 0