First: I had to make the url https instead of http so the geographical location can work
second: $.getJSON(api, function(data) {
});
is not working at all. I keep testing it using alert(“hi”) and it just doesnt work. I don’t know whats wrong.
Please help me