Skip to content

Instantly share code, notes, and snippets.

View ViewController.swift
//
// ViewController.swift
// GPSTracker
//
// Created by Perry Rose on 22/7/21.
//
import UIKit
import MapKit
import CoreLocation
@PerryRose
PerryRose / index.html
Created Jul 22, 2021
SIT314 A2 - index.html
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="script.js"></script>
<style>
#map {
@PerryRose
PerryRose / script.js
Created Jul 22, 2021
SIT314 A2 - script.js
View script.js
let runCoordinates = [];
const startPosition = { lat: -37.93062614791752, lng: 145.4574801141134};
let req = new XMLHttpRequest();
req.onreadystatechange = () => {
if (req.readyState == XMLHttpRequest.DONE) {
// Pass response to function
convertResponseIntoArray(req.responseText);
}
};