jbelien/mapfile-php-library
Composer 安装命令:
composer require jbelien/mapfile-php-library
包简介
PHP Library to read/write MapServer mapfiles
README 文档
README
PHP Library to read/write MapServer mapfiles.
This library is based on MapServer 7.2.0 documentation (last updated on 16 June 2017).
Installation
composer require jbelien/mapfile-php-library
Usage
Write MapFile (example)
$map = new \MapFile\Model\Map(); $map->name = 'my-mapfile'; $map->projection = 'EPSG:4326'; $map->scalebar = new \MapFile\Model\Scalebar(); $map->scalebar->units = 'kilometers'; $layer = new \MapFile\Model\Layer(); $layer->name = 'my-layer'; $layer->type = 'POLYGON'; $layer->status = 'ON'; $layer->data = 'my-shapefile'; $layer->projection = 'EPSG:4326'; $class = new \MapFile\Model\LayerClass(); $style = new \MapFile\Model\Style(); $style->color = [0, 0, 0]; $class->style->add($style); $label = new \MapFile\Model\Label(); $label->text = '[label]'; $label->color = [0, 0, 0]; $label->size = 12; $class->label->add($label); $layer->class->add($class); $map->layer->add($layer); (new \MapFile\Writer\Map($map))->save('my-mapfile.map');
Have a look at the source code to see all the available options.
Parse MapFile (example)
$map = (new \MapFile\Parser\Map())->parse('my-mapfile.map'); foreach ($map->layer as $layer) { echo $layer->name; }
jbelien/mapfile-php-library 适用场景与选型建议
jbelien/mapfile-php-library 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.91k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2016 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jbelien/mapfile-php-library 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jbelien/mapfile-php-library 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 5
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2016-12-03