agm/core and angular/google-maps what are the differences between them for google maps
Asked Answered
H

2

8

In my Angular application I need to add google map. I came across two libraries, not sure which one to use

npm install @angular/google-maps
npm install @agm/core --save

Can anyone please let me know which one is latest and has easy to develop or both are same.

This type of map I want to develop

  • Map without vertical and horizontal lines
  • I should be able to change background color
  • Countries should show cities when I zoom it
  • I should be able to show circle on particular location

enter image description here

Hazardous answered 24/7, 2020 at 4:44 Comment(0)
K
9
Library Doc npm
@angular/google-maps link link
@agm/core link link

@agm/core is an Angular adapter of Google Maps JavaScript Core API developed by Sebastian Holstein that is very popular in npm but is no longer maintained, the last update was in July 2020.

@angular/google-maps is developed by the official Angular team and the preferred choice as it has better support and maintenance.

Important: to use the Google Maps Javascript Core API in a prod environment you have to pay (Google Maps Javascript API usage and billing).

If you don't need to use Google Maps specifically, you could consider an open-source alternative library like leaflet (comparison)

Library Doc npm
leaflet link link
Kessinger answered 15/6, 2021 at 16:15 Comment(0)
G
4
  • @angular/google-maps - supported by angular team
  • @agm/core - is supported by Sebastian Holstein

Which one to use depends on which feature set you need. I found my self @agm/core providing me more features but again it depends on what you need.

Gib answered 24/7, 2020 at 4:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.