本文整理匯總了PHP中json::jsonPolygon方法的典型用法代碼示例。如果您正苦於以下問題:PHP json::jsonPolygon方法的具體用法?PHP json::jsonPolygon怎麽用?PHP json::jsonPolygon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類json
的用法示例。
在下文中一共展示了json::jsonPolygon方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: json
<?php
$strconn = "host=localhost port=5432 dbname=cursoGIS user=postgres password=12345";
$type = $_GET['type'];
$schema = $_REQUEST['schema'];
$table = $_GET['table'];
$column = $_GET['column'];
$srid = $_REQUEST['srid'];
$ancho = $_REQUEST['y'];
$zoom = $_REQUEST['zoom'];
$despX = $_REQUEST['despX'];
$despY = $_REQUEST['despY'];
require './json.php';
$json = new json();
if ($type == "POLYGON" || $type == "MULTIPOLYGON") {
$geojson = $json->jsonPolygon($strconn, $schema, $table, $column, $srid, $ancho, $zoom, $despX, $despY);
} elseif ($type == "POINT" || $type == "MULTIPOINT") {
$geojson = $json->jsonPoint($strconn, $schema, $table, $column, $srid, $ancho, $zoom, $despX, $despY);
} elseif ($type == "LINESTRING" || $type == "MULTILINESTRING") {
$geojson = $json->jsonLine($strconn, $schema, $table, $column, $srid, $ancho, $zoom, $despX, $despY);
}
print_r($geojson);