예제 #1
0
 public function apply($transformer, $media_container, $node)
 {
     $geo_tag = GeoTag::create();
     // Builds the image
     $script = $this->getProperty(self::PROPERTY_MAP_GEOTAG, $node);
     if ($script) {
         $geo_tag->withScript($script);
         $media_container->withGeoTag($geo_tag);
     } else {
         $transformer->addWarning(new InvalidSelector(self::PROPERTY_MAP_GEOTAG, $media_container, $node, $this));
     }
     return $media_container;
 }
예제 #2
0
 /**
  * Sets the geotag on the video.
  *
  * @see {link:http://geojson.org/}
  *
  * @param string $geoTag
  *
  * @return $this
  */
 public function withGeoTag($geoTag)
 {
     Type::enforce($geoTag, [Type::STRING, GeoTag::getClassName()]);
     if (Type::is($geoTag, Type::STRING)) {
         $this->geoTag = GeoTag::create()->withScript($geoTag);
     } elseif (Type::is($geoTag, GeoTag::getClassName())) {
         $this->geoTag = $geoTag;
     }
     return $this;
 }
예제 #3
0
 /**
  * Sets the geoTag on the image.
  *
  * @param GeoTag $geo_tag The tag to be set on the map object
  *
  * @see {link:http://geojson.org/}
  *
  * @return $this
  */
 public function withGeoTag($geo_tag)
 {
     Type::enforce($geo_tag, GeoTag::getClassName());
     $this->geoTag = $geo_tag;
     return $this;
 }