Remove jQuery use from geolocation orientation example
This commit is contained in:
@@ -180,9 +180,18 @@ geolocateBtn.addEventListener('click', function() {
|
|||||||
|
|
||||||
// simulate device move
|
// simulate device move
|
||||||
var simulationData;
|
var simulationData;
|
||||||
$.getJSON('data/geolocation-orientation.json', function(data) {
|
var client = new XMLHttpRequest();
|
||||||
simulationData = data.data;
|
client.open('GET', 'data/geolocation-orientation.json');
|
||||||
});
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle data loading.
|
||||||
|
*/
|
||||||
|
client.onload = function() {
|
||||||
|
simulationData = JSON.parse(client.responseText).data;
|
||||||
|
};
|
||||||
|
client.send();
|
||||||
|
|
||||||
var simulateBtn = document.getElementById('simulate');
|
var simulateBtn = document.getElementById('simulate');
|
||||||
simulateBtn.addEventListener('click', function() {
|
simulateBtn.addEventListener('click', function() {
|
||||||
var coordinates = simulationData;
|
var coordinates = simulationData;
|
||||||
|
|||||||
Reference in New Issue
Block a user