"jp",
/* title: page title */
"title" => "EasyWMSView",
/* htmltitle: if not specified, $title is applied. */
"htmltitle" => null,
/* copyright: footer string. simple html can be used. */
"copyright" => "powered by EasyWMSView.",
/* keywords: meta keywords in html. */
"keywords" => "EasyWMSView, OpenLayers, WMS, WMTS",
/* help_detail_url: custom help url. default help image (for jp or en)
* is applied if not specified. */
"help_detail_url" => null,
/* default params of lat, long and zoomlevel.
* valid range and unit are depends on Map object's params hard-coded
* in this php file. 0 will be good if you have no idea. */
"lat" => 4400000,
"long" => 15300000,
"zoomlevel" => 6,
/* function switches */
"enableLegend" => true,
"enableFeatureInfo" => true
);
/***
* ADVANCED CUSTOM PARAMETERS
***/
/* image_url: applied to Ext.IMAGE_SRC_URL. */
#$image_url = 'http://js.example.org/ext-3.3.1/resources/images/default/s.gif';
/* parameters around zkurai
* _url: zkurai service URL. disabled if not specified.
* _pdf_width, _pdf_height: page size of generated PDF.
*/
#$zkurai_url = 'http://example.com/zkurai/genpdf';
$zkurai_url = 'https://gbank.gsj.jp/genPDF/cgi-bin/genpdf.php';
$zkurai_pdf_width = 595;
$zkurai_pdf_height = 847;
/*****************************************************************************/
/* parse params in HTTP-REQUEST. */
if (isset($_SERVER)) {
switch($_SERVER['REQUEST_METHOD']) {
case 'GET': $req = &$_GET; break;
case 'POST': $req = &$_POST; break;
}
}
if (isset($req) && isset($req['dataset'])) {
$tmp_filename = htmlspecialchars($req['dataset'], ENT_QUOTES);
if (preg_match('/[\'"\`;\/\\\]/', $tmp_filename) != 0) {
printf("Error: invalid dataset
\n");
exit;
}
$json_filename = $tmp_filename . ".json";
}
if (! isset($json_filename)) {
/* dataset is not specified in HTTP-REQUEST. */
/* fallback sequence-1, auto redirect to specified URL. */
if (isset($redirect_url)) {
print_auto_jump_page($redirect_url, $redirect_desc, $redirect_sec);
exit;
}
/* skip auto-jumping unless redirect_url is set. */
/* fallback sequence-2, generate JSON-filename based on PHP-filename. */
$php_filename = basename(__FILE__);
$json_filename = preg_replace("/\.php$/", ".json", $php_filename);
if (strcmp($json_filename, $php_filename) == 0) {
printf("Error: un-expected PHP filename
\n");
exit;
}
}
$json_filename = $dataset_dir . "/" . $json_filename;
if (! (file_exists($json_filename) && is_file($json_filename))) {
printf("Error: invalid (or missing) dataset.
\n");
exit;
}
/* load and check json. */
if (prepare_json($json_filename) != true) {
exit;
}
?>