switchescoverage.php 864 B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. * Switches coverage map
  4. */
  5. if (ubRouting::get('action') == 'switchescoverage') {
  6. $ymconf = rcms_parse_ini_file(CONFIG_PATH . "ymaps.ini");
  7. $ym_center = $ymconf['CENTER'];
  8. $ym_zoom = $ymconf['ZOOM'];
  9. $ym_type = $ymconf['TYPE'];
  10. $ym_lang = $ymconf['LANG'];
  11. $area = '';
  12. if (wf_CheckGet(array('param'))) {
  13. $mapDimensions = explode('x', $_GET['param']);
  14. } else {
  15. $mapDimensions[0] = '1000';
  16. $mapDimensions[1] = '800';
  17. }
  18. $switchesCoverage = sm_MapDrawSwitchesCoverage();
  19. $coverageSwMap = wf_tag('div', false, '', 'id="ubmap" style="width: ' . $mapDimensions[0] . 'px; height:' . $mapDimensions[1] . 'px;"');
  20. $coverageSwMap .= wf_tag('div', true);
  21. $coverageSwMap .= sm_MapInitBasic($ym_center, $ym_zoom, $ym_type, $area . $switchesCoverage, '', $ym_lang);
  22. die($coverageSwMap);
  23. }