Example #1
0
/**
 * Returns switch mini-map
 * 
 * @param array $switchdata
 * @return string
 */
function web_SwitchMiniMap($switchdata)
{
    global $ubillingConfig;
    $ymconf = $ubillingConfig->getYmaps();
    $result = '';
    $result .= wf_tag('div', false, '', 'id="swmap" class="glamour" style="width: 97%; height:300px;"') . wf_tag('div', true);
    $result .= wf_delimiter();
    $placemarks = sm_MapDrawSwitches();
    $placemarks .= sm_MapDrawSwitchUplinks($switchdata['id']);
    $radius = 30;
    $area = sm_MapAddCircle($switchdata['geo'], $radius, __('Search area radius') . ' ' . $radius . ' ' . __('meters'), __('Search area'));
    $result .= sm_MapInitQuiet($switchdata['geo'], $ymconf['FINDING_ZOOM'], $ymconf['TYPE'], $area . $placemarks, '', $ymconf['LANG']);
    $result .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
    return $result;
}
Example #2
0
     if (!empty($_GET['cl'])) {
         $custLayers = explode('z', $_GET['cl']);
         if (!empty($custLayers)) {
             foreach ($custLayers as $eachCustLayerId) {
                 if (!empty($eachCustLayerId)) {
                     $placemarks .= $custmaps->mapGetPlacemarks($eachCustLayerId);
                 }
             }
         }
     }
 }
 if (wf_CheckGet(array('layers'))) {
     $layers = $_GET['layers'];
     //switches layer
     if (ispos($layers, 'sw')) {
         $placemarks .= sm_MapDrawSwitches();
     }
     //switches uplinks layer
     if (ispos($layers, 'ul')) {
         $placemarks .= sm_MapDrawSwitchUplinks();
     }
     //builds layer
     if (ispos($layers, 'bs')) {
         $placemarks .= um_MapDrawBuilds();
     }
 }
 if (wf_CheckGet(array('mapedit', 'showmap'))) {
     $editor = $custmaps->mapLocationEditor();
 } else {
     $editor = '';
 }