Skip to content

Instantly share code, notes, and snippets.

@MondeLionel
MondeLionel / fence.js
Last active October 3, 2020 11:27 — forked from bmoren/fence.js
HTML5 geolocation geofence location detection (without geofence API)
/* PLEASE NOTE
THE JS HAS BEEN ALTERED FOR RELEVANCE - simply copy and paste into your own JS and watch the console.
THE HTML AND CSS ARE WHOLLY UNUSED FOR THIS PARTICULAR CASE
please refer to the original gist here: https://gist.github.com/bmoren/22470de1cd47410e0902 for relevant jquery selectors and stuff.
*/
window.onload = function() {
var startPos;
var startPosLat;