EDIT: I have self-answered it below.
I have made a question on this before, however I could not properly set it up and the whole thing was broken. Below is the geolocation script. I would like to implement the blacklisting of certain areas (within a 500 foot radius if possible). Please explain to me how and where to make changes, as I am a beginner in JavaScript. thank you. (NOTE: No list or dictionary is on the page as it was part of my problem.)
current code:
if (navigator.geolocation) {
// Locate position
navigator.geolocation.getCurrentPosition(displayPosition, errorFunction);
} else {
alert('It seems like Geolocation, which is required for this page, is not enabled in your browser. Please use a browser which supports it.');
}
// Success callback function
function displayPosition(pos) {
var mylat = pos.coords.latitude;
var mylong = pos.coords.longitude;
var thediv = document.getElementById('locationinfo');
thediv.innerHTML = '<p>Your longitude is :' +
mylong + ' and your latitide is ' + mylat + '</p>';
// Error callback function
function errorFunction(pos) {
alert('Error!');
}