2017 © Pedro Peláez
 

library mapbox

Mapbox Static Map Generator

image

heinbez/mapbox

Mapbox Static Map Generator

  • Wednesday, December 9, 2015
  • by heinbez
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Installation

Installing the library is super easy., (*1)

Using Composer

composer require heinbez/mapbox 

Configuration

include '../vendor/autoload.php';

Mapbox\Mapbox::setConfig(
    new Mapbox\MapboxConfiguration([
        'host' => 'https://api.mapbox.com/v4',
        'style' => 'mapbox.light',
        'client' => [
            'key' => 'xxx',
            'secret' => 'xxx'
        ]
    ])
);

Using

$mapbox = new Mapbox\Mapbox($width, $height);

// Configure your path style
$mapbox->setStyle(
    new Mapbox\MapboxStyle([
        'stroke-width' => 6,
        'stroke' => '#6b5fe9',
        'stroke-opacity' => 1
    ])
);

// Push Coordinates
$mapbox->pushCoordinates(
    new MapboxCollection(array(
        [144.96300, -37,80650],
        [144.96500, -37,80680],
        etc..
    ));
);

// Return the map URL
echo $mapbox->generate();

Preview

, (*2)

The Versions

09/12 2015

dev-master

9999999-dev

Mapbox Static Map Generator

  Sources   Download

MIT

by Heinrich Bezuidenhout

geo static path map mapbox journey

08/12 2015

1.0.x-dev

1.0.9999999.9999999-dev

Mapbox Static Map Generator

  Sources   Download

MIT

by Heinrich Bezuidenhout

geo static path map mapbox journey