mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-30 20:13:49 +01:00
Work on the layers implementation.
This commit is contained in:
28
src/Netzmacht/Contao/Leaflet/Dca/Layer.php
Normal file
28
src/Netzmacht/Contao/Leaflet/Dca/Layer.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014 netzmacht creative David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
|
||||
class Layer
|
||||
{
|
||||
public function getVariants($dataContainer)
|
||||
{
|
||||
if ($dataContainer->activeRecord
|
||||
&& $dataContainer->activeRecord->tile_provider
|
||||
&& !empty($GLOBALS['LEAFLET_TILE_PROVIDERS'][$dataContainer->activeRecord->tile_provider]['variants'])
|
||||
) {
|
||||
return $GLOBALS['LEAFLET_TILE_PROVIDERS'][$dataContainer->activeRecord->tile_provider]['variants'];
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user