nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

loadFromUrl.js (323B)


      1 import services from './services';
      2 
      3 async function loadFromUrl(url) {
      4     for (let ServiceClass of services) {
      5         let service = new ServiceClass(url);
      6         if (service.isOurUrl()) {
      7             return service.geoData();
      8         }
      9     }
     10     return [{name: url, error: 'INVALID_URL'}];
     11 }
     12 
     13 export default loadFromUrl;