示例#1
0
            $node->appendChild($node_attr);
            $node_attr = $dom->createAttribute('lon');
            $node_attr->value = $matches['x'][0];
            $node->appendChild($node_attr);
            $title = $nodeLabel->appendChild($dom->createElement('title'));
            $title = $title->appendChild($dom->createTextNode($rows[$i]['name']));
            $ident = $nodeLabel->appendChild($dom->createElement('ident'));
            $ident = $ident->appendChild($dom->createTextNode($i));
        }
    }
    $dom->formatOutput = true;
    $res = $dom->saveXML();
    header("content-type: text/xml");
    print $res;
} elseif ($_GET['mode'] == 'GetSingularCableLinePoints') {
    $res = getSingularCableLinePoints(1);
    $rows = $res['rows'];
    $pois_text = "lat\tlon\ttitle\tdescription\ticon\ticonSize\ticonOffset\n";
    for ($i = 0; $i < $res['count']; $i++) {
        $OpenGIS = $rows[$i]['OpenGIS'];
        if (preg_match_all('/(?<x>[0-9.]+),(?<y>[0-9.]+)/', $OpenGIS, $matches)) {
            $lat = $matches['y'][0];
            $lon = $matches['x'][0];
            $clpId = $rows[$i]['CLPId'];
            $title = '<a target="_blank" href="CableLine.php?mode=charac&cablelineid=' . $rows[$i]['CableLine'] . '">' . $rows[$i]['CableLineName'] . '</a>';
            $description = '<a target="_blank" href="CableLinePoint.php?mode=change&cablelineid=' . $rows[$i]['CableLine'] . '&cablelinepointid=' . $clpId . '">Отметка: ' . $rows[$i]['meterSign'] . '<br/>Комментарий: ' . $rows[$i]['note'] . '</a>';
            $icon = "pic/rhomb_pic.png";
            $iconSize = "8,8";
            $iconOffset = "-4,-4";
            $pois_text .= $lat . "\t" . $lon . "\t" . $title . "\t" . $description . "\t" . $icon . "\t" . $iconSize . "\t" . $iconOffset . "\n";
        }
示例#2
0
            $node->appendChild($node_attr);
            $node_attr = $dom->createAttribute('lon');
            $node_attr->value = $matches['x'][0];
            $node->appendChild($node_attr);
            $title = $nodeLabel->appendChild($dom->createElement('title'));
            $title = $title->appendChild($dom->createTextNode($rows[$i]['name']));
            $ident = $nodeLabel->appendChild($dom->createElement('ident'));
            $ident = $ident->appendChild($dom->createTextNode($i));
        }
    }
    $dom->formatOutput = true;
    $res = $dom->saveXML();
    header("content-type: text/xml");
    print $res;
} elseif ($_GET['mode'] == 'GetSingularCableLinePoints') {
    $res = getSingularCableLinePoints(1, TRUE);
    $rows = $res['rows'];
    $pois_text = "lat\tlon\ttitle\tdescription\ticon\ticonSize\ticonOffset\n";
    for ($i = 0; $i < $res['count']; $i++) {
        $OpenGIS = $rows[$i]['OpenGIS'];
        if (preg_match_all('/(?<x>[0-9.]+),(?<y>[0-9.]+)/', $OpenGIS, $matches)) {
            $lat = $matches['y'][0];
            $lon = $matches['x'][0];
            $title = '<a target="_blank" href="CableLine.php?mode=charac&cablelineid=' . $rows[$i]['CableLine'] . '">' . $rows[$i]['CableLineName'] . '</a>';
            $description = '<a target="_blank" href="CableLine.php?mode=charac&cablelineid=' . $rows[$i]['CableLine'] . '">Отметка: ' . $rows[$i]['meterSign'] . '</a>';
            $icon = "pic/rhomb_pic.png";
            $iconSize = "8,8";
            $iconOffset = "-4,-4";
            $pois_text .= $lat . "\t" . $lon . "\t" . $title . "\t" . $description . "\t" . $icon . "\t" . $iconSize . "\t" . $iconOffset . "\n";
        }
    }