taviroquai / Laravel-Mapserver by taviroquai

MapServer package for Laravel
46
7
3
Package Data
Maintainer Username: taviroquai
Maintainer Contact: mafonso333@gmail.com (Marco Afonso)
Package Create Date: 2014-09-04
Package Last Update: 2015-03-06
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:01:04
Package Statistics
Total Downloads: 46
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 7
Total Watchers: 3
Total Forks: 2
Total Open Issues: 0

Laravel Mapserver package

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 ;)