コード例 #1
0
ファイル: map.php プロジェクト: bhagas/ksn
<?php

require_once './library/config.php';
if ($gid != "" && $table != "") {
    $mark = get_geom_from_point(get_centroids($gid, $table, $dbstring));
    //echo get_centroids($gid,$table,$dbstring);
    for ($i = 0; $i < count($mark); $i++) {
        $entity = explode(" ", $mark[$i]);
        if ($entity[0] != "" || $entity[1] != "") {
            $my_latA = $entity[1];
            $my_longA = $entity[0];
        }
    }
} else {
    if ($kecamatan != "") {
        $mark = get_geom_from_point(get_centroids_text($kecamatan, "administrasi"));
        for ($i = 0; $i < count($mark); $i++) {
            $entity = explode(" ", $mark[$i]);
            if ($entity[0] != "" || $entity[1] != "") {
                $my_latA = $entity[1];
                $my_longA = $entity[0];
            }
        }
        //echo "test".$my_latA;
    }
}
if ($my_latA == "" || $my_longA == "") {
    $my_lat = $default_lat;
    $my_long = $default_lon;
} else {
    $my_lat = $my_latA;
コード例 #2
0
ファイル: map.php プロジェクト: bhagas/ksn
<?php

require_once './library/config.php';
if ($gid != "" && $table != "") {
    $mark = get_geom_from_point(get_centroids($gid, $table, $dbstring));
    //echo get_centroids($gid,$table,$dbstring);
    for ($i = 0; $i < count($mark); $i++) {
        $entity = explode(" ", $mark[$i]);
        if ($entity[0] != "" || $entity[1] != "") {
            $my_latA = $entity[1];
            $my_longA = $entity[0];
        }
    }
} else {
    if ($kecamatan != "") {
        $mark = get_geom_from_point(get_centroids_text($kecamatan, "ar_batas_kecamatan"));
        for ($i = 0; $i < count($mark); $i++) {
            $entity = explode(" ", $mark[$i]);
            if ($entity[0] != "" || $entity[1] != "") {
                $my_latA = $entity[1];
                $my_longA = $entity[0];
            }
        }
        //echo "test".$my_latA;
    }
}
if ($my_latA == "" || $my_longA == "") {
    $my_lat = $default_lat;
    $my_long = $default_lon;
} else {
    $my_lat = $my_latA;