Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
Error downloading openstreetmap tile on react-native

I'm making a react-native application and I need to allow to use the map without internet. For this I download the tiles on the mobile with react-native-fs. I don't understand the following error:

[Error: Unable to resolve host "tile.openstreetmap.org": No address associated with hostname]

On postman I have to put a Host field in the header but in the doc I don't have this field indicated : https://operations.osmfoundation.org/policies/tiles/

postman request

request:

    RNFS.downloadFile({
      fromUrl: link,
      toFile:
        dir +
        '/' +
        splitLink[splitLink.length - 3] +
        '/' +
        splitLink[splitLink.length - 2] +
        '/' +
        splitLink[splitLink.length - 1],
      headers: {
        'User-Agent': 'android',
      },
    })
      .promise.then(response => {
        console.log('response', response);
        if (response.statusCode === 200) {
          return console.log('FILES UPLOADED!', response);
        } else {
          console.log('SERVER ERROR');
        }
      })
      .catch(err => {
        console.log('err', err);
      });

I think it's the Host field that's missing in my request but I can't find what value to put.

Thanks for your help :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!