public function reverseTransform($location)
 {
     return Document\Geolocation::fromGeoJson($location);
 }
예제 #2
0
 /**
  * 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;
 }