承接 firesphere/openstreetmaps 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

firesphere/openstreetmaps

最新稳定版本:1.0.5

Composer 安装命令:

composer require firesphere/openstreetmaps

包简介

A frontend maps module.

README 文档

README

GPL v3 or later

Usage:

MAPBOX_TOKEN=MyMapboxTokenSecret

Static image:

        /** @var Location $location */
        $location = Location::get()->last();

        $service = new OpenStreetmapService();
        $image = $service->getStaticMapImage($location, 500, 500, 15);
        echo $image->forTemplate();
        exit;

The following will add a map to a div on your page with id map.

If the div doesn't exist, things will break ;)

        Requirements::javascript('firesphere/openstreetmaps:dist/js/main.js');
        Requirements::css('firesphere/openstreetmaps:dist/css/main.css');
        $token = Environment::getEnv('MAPBOX_TOKEN');
        Requirements::insertHeadTags(
            <<<JS
<script type="text/javascript">var mapboxtoken = "$token";</script>
JS
        );
        $service = new OpenStreetmapService();
        $locations = Location::get();
        if ($locations->exists()) {
            $service->addLocations($locations->sort('Primary DESC'));
        }

Did you read this entire readme? You rock!

Pictured below is a cow, just for you.

               /( ,,,,, )\
              _\,;;;;;;;,/_
           .-"; ;;;;;;;;; ;"-.
           '.__/`_ / \ _`\__.'
              | (')| |(') |
              | .--' '--. |
              |/ o     o \|
              |           |
             / \ _..=.._ / \
            /:. '._____.'   \
           ;::'    / \      .;
           |     _|_ _|_   ::|
         .-|     '==o=='    '|-.
        /  |  . /       \    |  \
        |  | ::|         |   | .|
        |  (  ')         (.  )::|
        |: |   |;  U U  ;|:: | `|
        |' |   | \ U U / |'  |  |
        ##V|   |_/`"""`\_|   |V##
           ##V##         ##V##

统计信息

  • 总下载量: 307
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2023-09-15