public static function GeometryBoundaryTrait::getGeometryBoundaryQueryValue in Geolocation Field 8.3
Gets the value placeholder.
Parameters
string $placeholder: SQL placeholder.
string|float $filter_lat_north_east: The latitude to filter for.
string|float $filter_lng_north_east: The longitude to filter for.
string|float $filter_lat_south_west: The latitude to filter for.
string|float $filter_lng_south_west: The longitude to filter for.
Return value
array Placeholder array.
2 calls to GeometryBoundaryTrait::getGeometryBoundaryQueryValue()
- GeoBoundaryArgument::query in modules/
geolocation_geometry/ src/ Plugin/ views/ argument/ GeoBoundaryArgument.php - Set up the query for this argument.
- GeoBoundaryFilter::query in modules/
geolocation_geometry/ src/ Plugin/ views/ filter/ GeoBoundaryFilter.php - Add this filter to the query.
File
- modules/
geolocation_geometry/ src/ GeometryBoundaryTrait.php, line 56
Class
- GeometryBoundaryTrait
- Trait Geometry Boundary.
Namespace
Drupal\geolocation_geometryCode
public static function getGeometryBoundaryQueryValue(string $placeholder, $filter_lat_north_east, $filter_lng_north_east, $filter_lat_south_west, $filter_lng_south_west) : array {
return [
$placeholder => '{"type": "Polygon","coordinates": [[
[' . $filter_lng_south_west . ', ' . $filter_lat_south_west . '],
[' . $filter_lng_north_east . ', ' . $filter_lat_south_west . '],
[' . $filter_lng_north_east . ', ' . $filter_lat_north_east . '],
[' . $filter_lng_south_west . ', ' . $filter_lat_north_east . '],
[' . $filter_lng_south_west . ', ' . $filter_lat_south_west . ']
]]}',
];
}