taviroquai/mapserver

MapServer package for Laravel

v2.0.0 2015-03-06 15:19 UTC

This package is auto-updated.

Last update: 2024-11-08 07:04:02 UTC


README

Install

Add to composer.json

	require: {
		"taviroquai/mapserver": "~2.0"
	}

Add Service Provider on app/config/app.php

	'providers' => array(
		...
		'Taviroquai\Mapserver\MapserverServiceProvider',
	),
php composer.phar update

Usage

	// Create a MapServer instance
	$mapserver = new \Taviroquai\Mapserver\Mapserver();

	// Create a new map object (mapObj)
	$map = $mapserver->createMap(
		'test',
		storage_path('default.map'),
		storage_path('template.html')
	);

	// Return WMS capabilities
	$response = $mapserver->getCapabilitiesResponse($map);

	// Return map image as Illuminate response
    $response = $mapserver->getImageResponse($map);

	return $response;

Requirements

Of course Laravel 5, Mapserver and MapScript must be installed

Features

  1. Check whether MapServer is installed or not at the requested machine
  2. Opens a mapfile
  3. Export a mapfile
  4. Return a GetCapabilities response as Illuminate\HTTP\Response
  5. Creates map image as Illuminate\HTTP\Response

Call for Collab

All GEO lovers are invited to fork and grow this project ;)