public function prsp_export_xhbt_prspctvs($xhbt)
 {
     $prspctvs = ProspectPerspective::get_exhibit_perspectives($xhbt);
     // Create appropriate filename
     $fp = $this->createUTFOutput($xhbt . "-archive.json", true);
     fwrite($fp, '{"type": "Archive", "items": [' . "\n");
     // Fetch and write all Perspective definitions
     $first = true;
     foreach ($prspctvs as $the_prspctv) {
         if (!$first) {
             fwrite($fp, ",\n");
         }
         $first = false;
         $this->write_prspctv_data($fp, $the_prspctv);
     }
     fwrite($fp, "\n]}");
     // Close the output buffer
     fclose($fp);
     exit;
 }
Beispiel #2
0
    $first = false;
    echo '{ id: "' . $the_map->id . '", ';
    echo ' sname: "' . $the_map->meta_data['sname'] . '", ';
    echo ' credits: "' . $the_map->meta_data['credits'] . '", ';
    echo ' url: "' . $the_map->meta_data['url'] . '", ';
    echo ' subd: "' . $the_map->meta_data['subd'] . '", ';
    echo ' swBounds: ' . json_encode($the_map->meta_data['swBounds']) . ', ';
    echo ' neBounds: ' . json_encode($the_map->meta_data['neBounds']) . ', ';
    echo ' minZoom: ' . $the_map->meta_data['minZoom'] . ', ';
    echo ' maxZoom: ' . $the_map->meta_data['maxZoom'] . ', ';
    echo ' inverseY: ' . $the_map->meta_data['inverseY'] . ' }';
}
?>
 ],
		p: [ <?php 
$all_prspctvs = ProspectPerspective::get_exhibit_perspectives($the_xhbt->id);
// Output each entry
$first = true;
foreach ($all_prspctvs as $the_prspctv) {
    if (!$first) {
        echo ', ';
    }
    $first = false;
    echo '{ id: "' . $the_prspctv->id . '", ';
    echo ' l: "' . $the_prspctv->l . '", ';
    echo ' n: "' . $the_prspctv->note . '", ';
    echo ' s: ' . $the_prspctv->meta_state . ' }';
}
?>
	] };