Socket
Socket
Sign inDemoInstall

@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


Version published
Weekly downloads
369K
decreased by-20.46%
Maintainers
1
Install size
78.2 kB
Created
Weekly downloads
 

Package description

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

Readme

Source

Installation

npm install --save @types/googlemaps

Summary

This package contains type definitions for Google Maps JavaScript API 3.20 (https://developers.google.com/maps/).

Details

Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/googlemaps

Additional Details

  • Last updated: Sun, 03 Jul 2016 23:17:16 GMT
  • File structure: Global
  • Library Dependencies: none
  • Module Dependencies: none
  • Global values: google

Credits

These definitions were written by Folia A/S http://www.folia.dk, Chris Wrench https://github.com/cgwrench.

FAQs

Package last updated on 04 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc