Skip to content

AndrewJBateman/angular-tomtom-api

Repository files navigation

⚡ Angular Tomtom API

  • Angular app to display map data from the Tomtom API
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

*** Note: to open web links in a new window use: ctrl+click on link**

📄 Table of contents

📚 General info

  • Displays a Tomtom zoomable map that shows user position with full-screen and zoom options

📷 Screenshots

Example screenshot

📶 Technologies

💾 Setup

💻 Code Examples

  • extract from app.component.ts: function to get user position
private getUserPosition = (): Observable<Position> => {
    const userPosition = new Observable((observer: Subscriber<any>) => {
      navigator.geolocation
        ? navigator.geolocation.getCurrentPosition((pos: any) => {
            observer.next({
              latitude: pos.coords.latitude,
              longitude: pos.coords.longitude,
            });
            observer.complete();
          })
        : observer.error();
    });
    return userPosition;
  };

🆒 Features

  • Not much code required to get a zoomable world map

📋 Status & To-Do List

  • Status: Working. Size of build file: 9.46MB - nearly all Vendor files
  • To-Do: Nothing

👏 Inspiration

📁 License

  • This project is licensed under the terms of the MIT license.

✉️ Contact

  • Repo created by ABateman, email: gomezbateman@yahoo.com