Browse Source

Fix multiarea geom

pull/3/head
Wahyu Ramadhan 1 year ago
parent
commit
2ac211ffaf
  1. 2
      app/Http/Controllers/PresenceController.php

2
app/Http/Controllers/PresenceController.php

@ -267,7 +267,7 @@ class PresenceController extends Controller
// return count($valGeom->features);
$multiArea = $valGeom->features;
foreach($multiArea as $area){
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'),
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($area->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary"));
if($check[0]->boundary){
break;

Loading…
Cancel
Save