To solve this, I implemented the Ray Casting algorithm, a point-in-polygon algorithm that determines whether a GPS coordinate lies inside or outside a user-defined polygon. Users could create custom geofences by placing multiple markers on the map, and the system continuously evaluated the child's location against the defined boundary. This enabled accurate geofence monitoring and laid the foundation for triggering alerts whenever the child entered or exited the designated safe area.