Angular Google Maps
The Angular Google Maps component provides a wrapper around the Google Maps JavaScript API for Angular applications.Installation
To install the package, run:Getting an API Key
Follow these steps to get an API key that can be used to load Google Maps.Loading the API
Include the Dynamic Library Import script in theindex.html of your app:
Available Components
Core Components
- GoogleMap - Main map component
- MapMarker - Marker on the map (deprecated, use MapAdvancedMarker)
- MapAdvancedMarker - Advanced marker with customization
- MapInfoWindow - Information window popup
Shapes & Overlays
- MapPolyline - Line on the map
- MapPolygon - Polygon shape
- MapRectangle - Rectangle shape
- MapCircle - Circle shape
- MapGroundOverlay - Image overlay on the map
Layers
- MapKmlLayer - KML/KMZ layer
- MapTrafficLayer - Real-time traffic layer
- MapTransitLayer - Transit lines layer
- MapBicyclingLayer - Bicycling routes layer
- MapHeatmapLayer - Heatmap visualization
Other
- MapDirectionsRenderer - Route directions display
- MapMarkerClusterer - Marker clustering
- MapGeocoder - Geocoding service
The Options Input
The Google Maps components implement all of the options for their respective objects from the Google Maps JavaScript API through anoptions input, but they also have specific inputs for some of the most common options.
For example, you can set options using an options object: