public function reverseTransform($location) { return Document\Geolocation::fromGeoJson($location); }
/** * Set geolocation * * @param \Craft\LocationBundle\Document\Geolocation $geolocation * @return self */ public function setGeolocation($geolocation) { if ($geolocation instanceof Geolocation) { $this->geolocation = $geolocation; return $this; } $geolocation = Geolocation::fromGeoJson($geolocation); $this->geolocation = $geolocation; return $this; }