PHP Class GeoJson\Feature\Feature

See also: http://www.geojson.org/geojson-spec.html#feature-objects
Since: 1.0
Inheritance: extends GeoJson\GeoJson
Mostra file Open project: jmikola/geojson Class Usage Examples

Protected Properties

Property Type Description
$geometry GeoJson\Geometry\Geometry
$id mixed
$properties array Properties are a JSON object, which corresponds to an associative array.
$type

Public Methods

Method Description
__construct ( GeoJson\Geometry\Geometry $geometry = null, array $properties = [], mixed $id = null ) Constructor.
getGeometry ( ) : GeoJson\Geometry\Geometry Return the Geometry object for this Feature object.
getId ( ) : mixed Return the identifier for this Feature object.
getProperties ( ) : array Return the properties for this Feature object.
jsonSerialize ( )

Method Details

__construct() public method

Constructor.
public __construct ( GeoJson\Geometry\Geometry $geometry = null, array $properties = [], mixed $id = null )
$geometry GeoJson\Geometry\Geometry
$properties array
$id mixed

getGeometry() public method

Return the Geometry object for this Feature object.
public getGeometry ( ) : GeoJson\Geometry\Geometry
return GeoJson\Geometry\Geometry

getId() public method

Return the identifier for this Feature object.
public getId ( ) : mixed
return mixed

getProperties() public method

Return the properties for this Feature object.
public getProperties ( ) : array
return array

jsonSerialize() public method

See also: http://php.net/manual/en/jsonserializable.jsonserialize.php
public jsonSerialize ( )

Property Details

$geometry protected_oe property

protected Geometry,GeoJson\Geometry $geometry
return GeoJson\Geometry\Geometry

$id protected_oe property

protected mixed $id
return mixed

$properties protected_oe property

Properties are a JSON object, which corresponds to an associative array.
protected array $properties
return array

$type protected_oe property

protected $type