2

I am currently working on a private web project using HTML, CSS and JS. One of the main functions in my app is to display the current time, date and weather conditions. I am using navigator.geolocation API to track my location and make an api call with the corresponding long and lat values.

So I am very restricted to my location to test my app. For me it would be wonderful to test things with different situations for example:

Does the app work propper with current weather conditions in Los Angeles?

Can the app build the string location correctly for different cities? For example Munich, BY, Deutschland and Los Angeles, CA, America

I think this is a common problem in web development engineers have to handle. Are there any free and easy tools available to test the geographical features from an app?

I don´t know exactly how the current date is generated with var date = new Date(); but I think a VPN service won´t affect the date and time output. For my weather widget I am using long and lat attributes as I said.

I am calling an API with following structure:

let long;
  let lat;
 if (navigator.geolocation) {
   navigator.geolocation.getCurrentPosition(position => {
     long = position.coords.longitude;
     lat = position.coords.latitude;
     console.log(long);
     console.log(lat);
     const proxy = 'https://cors-anywhere.herokuapp.com/';
     const weather_key = 'my_keys';
     const weather_api = `${proxy}https://api.darksky.net/forecast/${weather_key}/${lat},${long}`;

This can also be very challenging if I want to manipulate my location via VPN because I pass exact long and lat attributes. Do you guys have any suggestions how to achieve my goal to test the app from different locations but technically being on only one location?

I hope this is the correct community to post such a questions.