Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@agm/core and @angular/google-maps what are the differences between them for google maps

I want to implement google map with angular. 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

like image 964
R15 Avatar asked Jul 24 '20 04:07

R15


2 Answers

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
like image 81
adrisons Avatar answered Sep 22 '22 12:09

adrisons


  • @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.

like image 45
Vova Bilyachat Avatar answered Sep 23 '22 12:09

Vova Bilyachat