02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Google Maps JavaScript API V3 Access

In this video we go through the critical steps that are involved before we can start working with the Google Maps API. We start by visiting the google API site(https://code.google.com/apis/console) once there register/log in and fill out all legal requirements. When you complete you will reach the page that we dig deeper into in this video and explore how we add more API keys to our applications. By the end of this video you will know how to add Google API keys and see how to integrate it into our HTML pages.

Video Transcript

00:00All right, so at this stage we have nothing obviously we haven't really created anything yet
00:04But our next stage stage is really we want to go into our Google API
00:08Now if you don't have if you didn't create it yet, just go to just search Google API console
00:15console fill in your legal
00:18requirements and login and register and do everything that you need to do until you reach this page until you reach your dashboard it might
00:24Look a little bit different
00:25But the concept in the way it works is basically the same what you want to do after that is you want to go into the services
00:32tab
00:33Once you're in the services tab
00:34You will want to scroll down and search for the Google API Google Maps API 3 version 3 3 not version 2
00:43You could get up to 25,000 requests requests a day for free, which is more than enough for our training purposes
00:50So I'm going to set it up and click on it to be true once I set it to beyond
00:54That's it. Our Google API access is now set
00:57We're allowed now to access this API and obviously there are many
01:01More other APIs that you could access to with Google that I strongly encourage you to look at them and take a peek at them
01:07But for now for our project all we really need is just to make sure that the Google Maps API is set and it is
01:14Next step we want to actually get our secret key or our key that we'll be able to add into our application
01:20Now to do that all we have to do is move into the API access tab in the API access tab
01:27You'll see that we have here if you scroll a bit down, you'll see your API key
01:31All you have to do is just copy this API key and by the way, you could always disable APIs
01:37Which is what I'll do once I'm done with the title to make sure that I still have access to my Google API because you
01:42Really don't want to share your key with other people because if you do then you're gonna lose
01:47Access features on on Google. So you want to make sure that you have your own key that's established
01:52What you're gonna do next is you're gonna copy this API key that you get and you're gonna put it right into your your key
01:59Area, which we've established earlier and you're just gonna swap it with your specific key in our case
02:05It's this long string, but in your case, it's gonna be a different string
02:08All right. So literally the area here that's highlighted is the area you would replace right before that and
02:15Sensor. All right, so that covers our
02:19Initial HTML part now the last part that we have to do in our HTML is we really want to make sure that we're actually
02:25Loading and when our application is done loading that we'll call an initiator function
02:31So to do that, we're just going to go into our body and just add a new property the on load property
02:36and in our in our on load load
02:39We'll just put an JavaScript function in it and we're gonna make sure that our init function will be called once our body is loaded

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!