Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular/google-maps

Package Overview
Dependencies
Maintainers
2
Versions
409
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/google-maps

Angular Google Maps

  • 18.0.0-next.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73K
decreased by-52.99%
Maintainers
2
Weekly downloads
 
Created

What is @angular/google-maps?

@angular/google-maps is an Angular package that provides a set of Angular components and services for integrating Google Maps into Angular applications. It allows developers to easily add maps, markers, and other map-related functionalities to their Angular projects.

What are @angular/google-maps's main functionalities?

Displaying a Google Map

This feature allows you to display a basic Google Map in your Angular application. The map's height and width can be customized using the height and width attributes.


{
  "template": "<google-map height='400px' width='750px'></google-map>",
  "component": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-map',\n  templateUrl: './map.component.html',\n  styleUrls: ['./map.component.css']\n})\nexport class MapComponent {}"
}

Adding Markers to the Map

This feature allows you to add markers to the Google Map. The position of the marker is specified using latitude and longitude coordinates.


{
  "template": "<google-map height='400px' width='750px'>\n  <map-marker [position]="{lat: 37.421995, lng: -122.084092}"></map-marker>\n</google-map>",
  "component": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-map',\n  templateUrl: './map.component.html',\n  styleUrls: ['./map.component.css']\n})\nexport class MapComponent {}"
}

Handling Map Events

This feature allows you to handle events on the Google Map, such as clicks. The example shows how to log the event details when the map is clicked.


{
  "template": "<google-map height='400px' width='750px' (mapClick)='onMapClick($event)'></google-map>",
  "component": "import { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-map',\n  templateUrl: './map.component.html',\n  styleUrls: ['./map.component.css']\n})\nexport class MapComponent {\n  onMapClick(event: google.maps.MapMouseEvent) {\n    console.log('Map clicked', event);\n  }\n}"
}

Other packages similar to @angular/google-maps

Keywords

FAQs

Package last updated on 11 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc