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

@types/googlemaps

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/googlemaps

TypeScript definitions for Google Maps JavaScript API 3.20

  • 3.20.27-alpha
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
528K
increased by6.19%
Maintainers
1
Weekly downloads
 
Created

What is @types/googlemaps?

@types/googlemaps provides TypeScript type definitions for the Google Maps JavaScript API, enabling developers to use Google Maps functionalities with type safety and autocompletion in TypeScript projects.

What are @types/googlemaps's main functionalities?

Map Initialization

This feature allows you to initialize a Google Map with a specified center and zoom level.

const map = new google.maps.Map(document.getElementById('map'), { center: { lat: -34.397, lng: 150.644 }, zoom: 8 });

Adding Markers

This feature allows you to add markers to the map at specified locations.

const marker = new google.maps.Marker({ position: { lat: -34.397, lng: 150.644 }, map: map, title: 'Hello World!' });

Geocoding

This feature allows you to convert addresses into geographic coordinates and place markers on the map.

const geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': 'Sydney, NSW' }, function(results, status) { if (status === 'OK') { map.setCenter(results[0].geometry.location); const marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert('Geocode was not successful for the following reason: ' + status); } });

Drawing Shapes

This feature allows you to draw shapes like rectangles on the map, with options to make them editable and draggable.

const rectangle = new google.maps.Rectangle({ bounds: { north: 33.685, south: 33.671, east: -116.234, west: -116.251 }, editable: true, draggable: true }); rectangle.setMap(map);

Other packages similar to @types/googlemaps

FAQs

Package last updated on 08 Jul 2016

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