2017 © Pedro Peláez
 

library esri-feature-service

A helper class for using ESRI Feature Services

image

times/esri-feature-service

A helper class for using ESRI Feature Services

  • Wednesday, June 7, 2017
  • by chrishutchinson
  • Repository
  • 3 Watchers
  • 1 Stars
  • 160 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

ESRI Feature Service Class

A PHP class for interfacing with ESRI's feature service API., (*1)

Installation

Install via composer., (*2)

$ composer require times/esri-feature-service

Usage

require './vendor/autoload.php';

$featureService = ''; // URL to the feature service
$sourceJson = ''; // URL to your JSON file containing an array of data
$token = ''; // A string containing the token, or an array containing `username` and `password`

// Define our mapper class. The `EsriFeatureService` class calls the `map()` method below to map the loaded in data into the format defined in this method (to match the needs of your ESRI map)
class CustomMapper {

    public function map($record) {
        return array(
            'someProperty' = $record->someProperty
        )
    }

}

// Initialise our mapper
$CustomMapper = new CustomMapper;

// Initialise the EsriFeatureService and pass in the mapper
$FeatureService = new EsriFeatureService($featureService, $sourceJson, $token, $CustomMapper);

// Trigger the data update
$response = $FeatureService->update();

// Dump the response (an array of successes, failures and errors)
var_dump($response);

The Versions

07/06 2017

dev-master

9999999-dev

A helper class for using ESRI Feature Services

  Sources   Download

MIT

The Requires

 

by Chris Hutchinson

07/06 2017

1.0.2

1.0.2.0

A helper class for using ESRI Feature Services

  Sources   Download

MIT

The Requires

 

by Chris Hutchinson

22/06 2016

1.0.1

1.0.1.0

A helper class for using ESRI Feature Services

  Sources   Download

MIT

The Requires

 

by Chris Hutchinson