Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewjbateman/angular-tomtom-api
:clipboard: Angular app to display map data from the Tomtom API
https://github.com/andrewjbateman/angular-tomtom-api
angular angular15 html5 linter maps scss tomtom-api tomtom-map
Last synced: about 21 hours ago
JSON representation
:clipboard: Angular app to display map data from the Tomtom API
- Host: GitHub
- URL: https://github.com/andrewjbateman/angular-tomtom-api
- Owner: AndrewJBateman
- License: mit
- Created: 2020-11-01T19:37:04.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-06T16:59:07.000Z (over 1 year ago)
- Last Synced: 2023-06-06T17:30:57.242Z (over 1 year ago)
- Topics: angular, angular15, html5, linter, maps, scss, tomtom-api, tomtom-map
- Language: TypeScript
- Homepage:
- Size: 2.69 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :zap: Angular Tomtom API
* Angular app to display map data from the [Tomtom API](https://developer.tomtom.com/)
* **Note:** to open web links in a new window use: _ctrl+click on link_![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/angular-tomtom-api?style=plastic)
![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-tomtom-api?style=plastic)
![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-tomtom-api?style=plastic)
![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-tomtom-api?style=plastic)*** Note: to open web links in a new window use: _ctrl+click on link_**
## :page_facing_up: Table of contents
* [:zap: Angular Tomtom API](#zap-angular-tomtom-api)
* [:page\_facing\_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal\_strength: Technologies](#signal_strength-technologies)
* [:floppy\_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status \& To-Do List](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file\_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)## :books: General info
* Displays a [Tomtom](https://developer.tomtom.com/maps-api/maps-api-documentation) zoomable map that shows user position with full-screen and zoom options
## :camera: Screenshots
![Example screenshot](./img/map.png)
## :signal_strength: Technologies
* [Angular v16](https://angular.io/)
* [Node module: @tomtom-international/web-sdk-maps v6](https://www.npmjs.com/package/@tomtom-international/web-sdk-maps)
* [Tomtom developer API](https://developer.tomtom.com/)## :floppy_disk: Setup
* Install dependencies by running `npm i`
* See [Tomtom: Angular Map Display API integration tutorial](https://developer.tomtom.com/maps-sdk-web-js-public-preview/tutorials-basic/angular-map-display-api-integration-tutorial) and add code as shown
* Get yourself an [API key from Tomtom](https://developer.tomtom.com/how-to-get-tomtom-api-key) - it's free :-) and add it to `environment.ts`
* Run `ng serve` to start a server on port 4200
* Run `npm run build` to create build file in `dist/angular-tomtom-api` directory.## :computer: Code Examples
* extract from `app.component.ts`: function to get user position
```typescript
private getUserPosition = (): Observable => {
const userPosition = new Observable((observer: Subscriber) => {
navigator.geolocation
? navigator.geolocation.getCurrentPosition((pos: any) => {
observer.next({
latitude: pos.coords.latitude,
longitude: pos.coords.longitude,
});
observer.complete();
})
: observer.error();
});
return userPosition;
};
```## :cool: Features
* Not much code required to get a zoomable world map
## :clipboard: Status & To-Do List
* Status: Working. Size of build file: 9.46MB - nearly all Vendor files
* To-Do: Nothing## :clap: Inspiration
* [Tomtom: Angular Map Display API integration tutorial](https://developer.tomtom.com/maps-sdk-web-js-public-preview/tutorials-basic/angular-map-display-api-integration-tutorial)
* [Tomtom documentation](https://developer.tomtom.com/maps-sdk-web-js/tutorials/use-cases/how-add-and-customize-location-marker)## :file_folder: License
* This project is licensed under the terms of the MIT license.
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: `[email protected]`