Skip to content

A webpage that displays a Google Map with 2 random points of interest. Built with typescript.

Notifications You must be signed in to change notification settings

astileanua1141/typescript_google_map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This repository contains a small TypeScript proof of concept. The objective is to display a new Google Map in a browser window, and show 2 randomly generated location coordinates, for a User and a company. Clicking on them will show a description pop-up window, displaying random generated names or, for companies, the catchphrase.

This project has a learning objective through practice.


Installation

  • remember to replace the with the actual key, in index.html

  • to run this project on local dev machine (instead of nodemon + ts support):

    $ npm install -g parcel-bundler
    $ parcel index.html

Dependencies:

  • @faker-js/faker (v7.5.0) to generate random names, coordinates and catchphrases
  • @types/google.maps (v3.50.2) used to display and manage the Map

TODOs:

  • [FIXME] In CustomMaps.ts, the constructor for a new Map requires a non-null HTML Element. A quick fix was to provide a size and width in the style element, in index.html, so the map display is correct.
    Reference:

    CustomMaps.ts:
    new google.maps.Map(document.getElementById(divId)...

  • [best practice] Introduce the API key as an environment constant, but the project is really small so I skipped that for now

About

A webpage that displays a Google Map with 2 random points of interest. Built with typescript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published