Move ajax handling to the map service.

This commit is contained in:
David Molineus
2015-01-28 16:40:48 +01:00
parent fdc427d92b
commit ff0d2d9ec6
4 changed files with 84 additions and 54 deletions

View File

@@ -15,12 +15,12 @@ use Netzmacht\Contao\Leaflet\Event\BuildDefinitionEvent;
use Netzmacht\Contao\Leaflet\Event\ConvertToGeoJsonEvent;
use Netzmacht\Contao\Leaflet\Event\GetHashEvent;
use Netzmacht\Contao\Leaflet\Filter\Filter;
use Netzmacht\Contao\Leaflet\Model\MapModel;
use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Value\GeoJson\ConvertsToGeoJsonFeature;
use Netzmacht\LeafletPHP\Value\GeoJson\Feature;
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
use Netzmacht\LeafletPHP\Value\GeoJson\GeoJsonFeature;
use Netzmacht\LeafletPHP\Value\LatLngBounds;
use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcher;
/**
@@ -78,6 +78,18 @@ class DefinitionMapper
return $this;
}
/**
* Reset the internal cache.
*
* @return $this
*/
public function reset()
{
$this->mapped = array();
return $this;
}
/**
* Build a model.
*