当前位置: 首页>>代码示例>>PHP>>正文


PHP DataConnector::getDataStore方法代码示例

本文整理汇总了PHP中DataConnector::getDataStore方法的典型用法代码示例。如果您正苦于以下问题:PHP DataConnector::getDataStore方法的具体用法?PHP DataConnector::getDataStore怎么用?PHP DataConnector::getDataStore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataConnector的用法示例。


在下文中一共展示了DataConnector::getDataStore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ThematicMap

            // Fetch available years for one indicator
        // Fetch available years for one indicator
        case 'indYears':
            $indicatorID = (int) $_REQUEST['id'];
            // Avoid exploitation
            // Returns JSON encoded array of available years for one indicator
            echo $dataConnector->getIndicatorYears($indicatorID);
            break;
        case 'makeKMZ':
            // Include engine class
            require_once 'TME_Engine.php';
            $year = 0;
            // 0 = All years
            $region = 0;
            // 0 = All regions
            // Get indicator ID
            $indicatorID = (int) $_REQUEST['indicator'];
            // Check if one year or time series
            if ($_REQUEST['timeType'] == 'year') {
                $year = $_REQUEST['year'];
            }
            // Create data store
            $dataStore = $dataConnector->getDataStore($indicatorID, $year, $region);
            // Create thematic map object
            $map = new ThematicMap($dataStore, $_REQUEST);
            // Create KML
            $file = $map->getKML();
            // Return JSON with file url
            echo "{success: true, file: '{$file}'}";
    }
}
开发者ID:abidinamdar,项目名称:thematicmapping,代码行数:31,代码来源:TME_FormHandler.php

示例2: DataConnector

// SOFTWARE NAME: Thematic Mapping Engine
// SOFTWARE RELEASE: 1.6
// COPYRIGHT NOTICE: Copyright (C) 2008 Bjorn Sandvik,
//                   bjorn@thematicmapping.org
// SOFTWARE LICENSE: GNU General Public License version 3 (GPLv3)
// NOTICE: >
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of version 3 of the GNU General
//  Public License as published by the Free Software Foundation.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//  GNU General Public License for more details.
//  http://www.gnu.org/licenses/
//
//
// This file shows how maps can be created with the DataConnector
// and ThematicMap classes.
// Can be changed to another data connector class
require_once 'TME_MySQL_DataConnector.php';
// Include engine class
require_once 'TME_Engine.php';
$dataConnector = new DataConnector();
$dataStore = $dataConnector->getDataStore(1230, 2005, 0);
// indicator / year / region
$parameters = array('mapType' => 'prism', 'indicator' => 1230, 'year' => 2005, 'classification' => 'equal');
// Create thematic map object
$map = new ThematicMap($dataStore, $parameters);
$file = $map->getKML();
echo "<p><a href='{$file}'>{$file}</a>";
开发者ID:abidinamdar,项目名称:thematicmapping,代码行数:31,代码来源:TME_Example.php

示例3: array

    }
    if (empty($barSize)) {
        $barSize = 5000;
    }
    if (empty($maxHeight)) {
        $maxHeight = 2000000;
    }
    $parametersTME = array('mapType' => 'bar', 'indicator' => 'valores', 'year' => $ano, 'classification' => 'quantile', 'mapTitle' => $_GET["titulo"], 'timeType' => $tipo, 'dirtmp' => $dir_tmp, 'barSize' => $barSize, 'maxHeight' => $maxHeight, 'outlinecolor' => $_GET["outlinecolor"], 'numvertices' => $_GET["numvertices"], 'symbolType' => 'polygon');
}
$nomeTemp = array_merge($_GET, $_POST);
$nomeTemp = md5(implode("", $nomeTemp));
$nomeFile = $dir_tmp . "/tme" . $nomeTemp . ".kmz";
//sesion e aberto com isso
$dataConnector = new DataConnector($_GET["sid"], $verificaSID);
if (!file_exists($nomeFile)) {
    $dataStore = $dataConnector->getDataStore($_GET["nomelayer"], $colunas, $_GET["colunanomeregiao"], $_GET["titulo"], $_GET["descricao"], "", $parametersTME["mapType"]);
} else {
    $dataStore = "";
}
$url = $_SESSION["tmpurl"] . "/tme" . $nomeTemp . ".kmz";
// Create thematic map object
$map = new ThematicMap($dataStore, $parametersTME, $nomeTemp);
$file = $map->getKML($dataConnector->url, $download, $nomeFile);
$nomeArquivo = $map->nomeArquivo;
$legenda = str_replace("kmz", "png", basename($nomeArquivo));
$legenda = str_replace("tme", "legend", $legenda);
$legenda = str_replace(basename($nomeArquivo), $legenda, $file);
if (isset($inclusao) && $inclusao == true) {
    $download = true;
}
if (!$download) {
开发者ID:edmarmoretti,项目名称:i3geo,代码行数:31,代码来源:TME_i3geo.php


注:本文中的DataConnector::getDataStore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。