Socket
Socket
Sign inDemoInstall

google-maps-api-typings

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-maps-api-typings

TypeScript typings for `@google/maps` Node.JS API project.


Version published
Maintainers
1
Weekly downloads
431
decreased by-9.83%

Weekly downloads

Readme

Source

Google Maps API Typings

This project contains the TypeScript interface declaration of the @google/maps Node.JS API project.

It also provides inline documentation from the official Google Maps Documentation platform.

Google Maps API Typings Example

Installation

Just install both the official Google Maps API package and the Google Maps API Typings using npm:

npm i @google/maps
npm i google-maps-api-typings --save-dev

Usage

import 'google-maps-api-typings';
import { createClient } from "@google/maps";

const client = createClient({
    key: 'my-google-maps-api-key',
    language: 'jp',
    Promise: Promise
});

client
    .geocode({ address: 'Leaning Tower of Pisa' })
    .asPromise()
    .then(response => {
        response.json.results.forEach(result => {
            console.log(
                result.geometry.location
            );
        })
    });

This will output: { lat: 43.722952, lng: 10.396597 }.

Supported APIs

Note

Do not confuse the Google Maps Node.JS API with the Google Maps Javascript API.

FAQs

Last updated on 21 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc