api.mapscompat.php 463 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Maps services compatibility dispatcher
  4. */
  5. $mapsCfg = rcms_parse_ini_file(CONFIG_PATH . 'ymaps.ini');
  6. $mapsService = isset($mapsCfg['MAPS_SERVICE']) ? $mapsCfg['MAPS_SERVICE'] : 'yandex';
  7. switch ($mapsService) {
  8. case 'yandex':
  9. include('api/libs/api.ymaps.php');
  10. break;
  11. case 'google':
  12. include('api/libs/api.gmaps.php');
  13. break;
  14. case 'leaflet':
  15. include('api/libs/api.lmaps.php');
  16. break;
  17. }
  18. ?>