代码拉取完成,页面将自动刷新
<?php
/**
* 积木云渲染器
*
* @package XbCode
* @author 楚羽幽 <958416459@qq.com>
* @version 1.0
* @license Apache License 2.0
* @link http://www.xbcode.net
* @document http://doc.xbcode.net
*/
namespace plugin\xbDevExample\app\admin\controller;
use support\Request;
use plugin\xbCode\XbController;
use plugin\xbCode\builder\Builder;
use plugin\xbCode\builder\Renders\Form;
/**
* 地图表单
* @copyright 贵州小白基地网络科技有限公司
* @author 楚羽幽 cy958416459@qq.com
*/
class FormMapsController extends XbController
{
/**
* 列表
* @return \support\Response
* @copyright 贵州小白基地网络科技有限公司
* @author 楚羽幽 cy958416459@qq.com
*/
public function index(Request $request)
{
$builder = Builder::form(function (Form $builder) {
// 设置无包裹框
$builder->useForm()->wrapWithPanel(false);
$builder->addRowDivider('地图组件示例');
$builder->addRowAmapPicker('AmapPicker', '高德地图-位置选择器')->ak('4ba3ba65f14940e699fc219576b9b103');
$builder->addRowAmapPicker('aMapPickerStatic', '高德地图-静态展示')->static(true);
$builder->addRowBmapPicker('bMapPicker', '百度地图-位置选择器')->ak('LiZT5dVbGTsPI91tFGcOlSpe5FDehpf7');
$builder->addRowBmapPicker('bMapPickerStatic', '百度地图-静态展示', [
"address" => "北京市西城区复兴门内大街97号",
"lat" => 39.91404014231763,
"lng" => 116.36857981150743,
"zoom" => 12
])
->ak('LiZT5dVbGTsPI91tFGcOlSpe5FDehpf7')
->staticSchema([
'embed' => true,
'showAddress' => true,
'mapStyle' => [
'height' => '600px',
],
])
->static(true);
});
$builder->setMethod('POST');
return $this->successRes($builder);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。