JS-151-API
  • JavaScript Library
  • 02-DOM-Manipulation
    • Overview
    • DOM Explained
    • Example Setup
    • Selecting Elements
    • Events
    • Complete Example
  • 03-API Fundamentals
    • 0-Getting Started
      • Welcome
    • 1-Intro-To-APIs
      • Intro
      • Client
      • Requests
      • JSON
      • API Endpoints
      • Server
      • Response
      • Statelessness
      • REST
    • 2-Asynchronous-Programming
      • Intro
      • Callbacks
      • Promises
      • Promises Continued
      • Chaining Promises
    • 3-Fetch
      • Fetch Intro
      • Star Wars
        • Star Wars API
        • Star Wars Setup
        • Star Wars JS
      • Random Photo
        • Unsplash
        • Unsplash Setup
        • Unsplash JS
    • 4-Apps
      • 01-New York Times
        • 00-App Intro
        • 01-HTML/CSS/API Key
        • 02-Variables
        • 03-Event Listeners
        • 04-fetchResults
          • 01-fetchResults()
          • 02-preventDefault()
          • 03-fetch() method
          • 04-Dates
        • 05-displayResults
          • 01-Logging JSON
          • 02-Working with JSON
          • 03-Link Display
          • 04-Results Navigation
          • 05-Results Update
          • 06-Keywords
          • 07-Images
        • 06-Pagination
          • 01-Pagination Intro
          • 02-Pagination Functions
        • 07-Next Steps
      • 02-YouTube
        • html
        • youtube.css
        • youtube.js
      • 03-GoogleMaps
        • Setup
        • HTML and CSS files
        • API Key
        • JS Setup
        • Adding Your Location
        • Listeners
        • Custom Options
Powered by GitBook
On this page
  • File Structure
  • Prep Work
  • What We Are Going to Build
  1. 03-API Fundamentals
  2. 4-Apps
  3. 03-GoogleMaps

Setup

Previous03-GoogleMapsNextHTML and CSS files

Last updated 7 years ago

The following modules will take you through building a simple program to access and display information from GoogleMaps. This tutorial was created by Mozilla and can be found .

File Structure

We will be working with the following files:

    javascript-library
        └── 0-JavaScript-PreWork
        └── 1-JavaScript-Fundamentals
        └── 2-JavaScript-DOM-Manipulation
        └── 3-JavaScript-API-Fundamentals
            └── 1-Intro-to-API
            └── 2-Asynchronous-Programming
            └── 3-Fetch
            └── 4-Apps
                └── 01-New-York-Times
                └── 02-Pokemon
                └── 03-YouTube
                └── 04-GoogleMaps
                        index.html <-------- You will be working with these files
                        googlemaps.css <----
                        googlemaps.js <-----

Prep Work

What We Are Going to Build

We're going to build a little application that uses the GoogleMaps JavaScript API. We will use this to display our current location on a map and also play with some other icons on the map.

Before you start this section, bookmark the . We are staying aligned with the MDN docs. Navigate to the google-maps folder (/javascript/apis/third-party-apps/google-maps). There are two files here: index.html, which is the completed code, and maps_start.html. Feel free to consult the finished code if you get stuck, but try to do it yourself first rather than just copying the completed program. We will be building maps_start ourselves.

here
following repository