So in this section,
we're gonna build the biggest and coolest project yet.
And as always,
let's start by looking at the finished project,
so that we can get a feel of what we're gonna build here.
And so this is the mapty Application.
So you have just a small sidebar here on the left side.
And then the main part of the application is this huge map.
And so this map is actually loaded,
from a third party service.
And so in the section, you're gonna learn how to do that.
And also the position is actually automatically obtained
by the browser using geolocation.
So let me turn this off here for now, the geolocation,
and now I will reload.
And then the browser will ask me here,
if it is allowed to know my location.
So probably you have seen this year in other applications.
And so you will learn how to do this yourself now.
So I click allow and then JavaScript will fetch my position,
and it will then also load the map on my current position.
Now the goal of this application
is for me to log my workouts.
So let's say I work out here downtown of the city.
So here I have this form where I can input my workout.
So here's the type which is gonna be running for now.
Then let's say I have five kilometers and 20 minutes.
And with 175 steps per minute.
Then I hit enter,
and then you see it prints here nicely on the sidebar.
And also on our map,
we got this pin together with this popup now, am I right?
And of course we can do another one.
Let's say I went cycling here a bit in the mountains.
So here I can choose a different type.
So this application allows us to log a running and cycling,
and now watch what happens here to this the last value.
So it changes from step to minutes to an elevation gain.
So let's say I did 50 kilometers in five hours,
and an elevation gain of 400 meters.
And so you'll see,
that now I get this popup here with cycling.
Let's just do one more.
Let's say over here,
which is another nice spot to go running.
And this actually has to be running again.
And let's say 180 steps per minute.
And now what's cool about this.
Let's say I have activities all over the place.
Then I can just click here,
and it will automatically move to map to that workout, okay.
So that's really nice.
And I think this looks like a real nice real world project,
and we're gonna have a lot of fun,
building this one together.
Of course, it could be even more real world.
For example, we could be able to trace whole lines
or polygons here on the map, but as always,
I wanted to keep it simple here
and focus mainly on the learning,
and on just implementing some other features
that are also pretty cool.
I believe at least.
Another thing that is special here,
is that actually when we close this app and reload it.
So let's just reload.
It we'll basically keep it state.
So you see that the workouts, are still here,
and they're also still on the map.
So you'll see, it's still everything here,
even after we basically closed down and open it again.
And of course, this also works if I copy it,
open another tab and so here it is, here's all the data.
So essentially this data about the workouts,
is gonna be stored in a browser.
And then each time we load the page,
we will read the data from the browser.
And so that's a, yet another really cool browser API.
And that we're gonna learn about here in this project.
All right, and now that we have a broad overview,
of how this application works,
let's quickly take a look at our starter files here,
one more time.
So this is the JavaScript.
And once again, I already have my elements preselected here.
So we don't have to waste time with that.
Then here we have to style.
And as always, you can have some fun by going through that.
Then here's the HTML file,
which is gonna be important
because we will need some code from here.
And then will also see that I have this flow chart here
for this application,
and also a diagram for the architecture,
but I will not look at this flow chart for now,
because actually in this project,
I will explain you exactly how to come up
with a flow chart like this.
And in fact, that's gonna be the topic
of the next lecture.
And so let's move there right now.