Skip to content

Instantly share code, notes, and snippets.

@kanikash4
Created August 23, 2024 07:04
Show Gist options
  • Save kanikash4/418a98a87ed9627e7930b5770109fd77 to your computer and use it in GitHub Desktop.
Save kanikash4/418a98a87ed9627e7930b5770109fd77 to your computer and use it in GitHub Desktop.
Check if latitude and longitude is of India
val longitude = map.getAsOrElse[String]("$payload.longitude}", "0.0").toDouble
val latitude = map.getAsOrElse[String]("$payload.latitude}", "0.0").toDouble
if((longitude<68.17) || (longitude>97.41) || (latitude<7.96) || (latitude>35.50)) && (longitude!=0.0) && (latitude!=0.0))
{"BLOCK"}
else
{"PASS"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment