Location\Formatter\Coordinate\GeoJSON::format PHP Метод

format() публичный Метод

public format ( Coordinate $coordinate ) : string
$coordinate Location\Coordinate
Результат string
    public function format(Coordinate $coordinate)
    {
        return json_encode(['type' => 'Point', 'coordinates' => [$coordinate->getLng(), $coordinate->getLat()]]);
    }
GeoJSON