本文整理汇总了PHP中Map::Save方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::Save方法的具体用法?PHP Map::Save怎么用?PHP Map::Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map::Save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
include_once dirname(__FILE__) . "/config.php";
include_once dirname(__FILE__) . "/include/definitions.php";
if ($_POST["id"] && is_numeric($_POST["id"])) {
$map = new Map();
$map->Load($_POST["id"]);
if (!$map->IsGeocoded) {
$map->AddGeocoding();
if ($map->IsGeocoded) {
$map->Save();
Helper::WriteToLog("Added geocoding data to database for map with id " . $_POST["id"] . ".");
print "1";
} else {
Helper::WriteToLog("Failed to add geocoding data to database for map with id " . $_POST["id"] . ". Probably no QuickRoute jpeg file.");
print "2";
}
} else {
print "3";
}
}
示例2: PlatformContext
global $platformDefaultConfig;
$platformContext = new PlatformContext($platformDefaultConfig);
$platformContext->RestoreSession(session_id());
$mapResource = new Resource($platformContext, substr($szMapFile, 10));
$sType = $mapResource->GetStoredType();
if (strtolower($sType) == "publishedmap") {
$szPlatformMapfile = $mapResource->GetResourceContent("content")->get("content");
if (file_exists($szPlatformMapfile)) {
$modifyPaths = true;
$oMap = ms_newMapObj($szPlatformMapfile);
$szMapFile = $szPlatformMapfile;
}
} else {
$mapGen = new Map($platformContext, substr($szMapFile, 10));
if ($mapGen->Exists()) {
$result = $mapGen->Save();
if ($result->IsOk()) {
$sMapFileContents = $result->Get('MAPDATA');
} else {
echo var2json($result);
die;
}
$oMap = ms_newMapObjFromString($sMapFileContents);
}
}
/*
*/
} else {
if (file_exists($szMapFile)) {
$modifyPaths = true;
$oMap = ms_newMapObj($szMapFile);