New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gmaps-loader

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmaps-loader

Promise based Google Maps API loader

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gmaps-loader Build Status

Promise based Google Maps API loader

Install

npm install gmaps-loader

Example usage

var Loader = require('gmaps-loader');

var init = function() {
  var loader = new Loader({
    apiKey: '<YOUR_API_KEY>' //Should of course be a real key, this will throw an error.
  });

  loader.load()
    .then(function(api) {
      new api.Map(document.querySelector('#canvas'), {
        center: {
          lat: -34.397,
          lng: 150.644
        },
        zoom: 8
      });
    });
};

document.addEventListener('DOMContentLoaded', init);

API

callback

Type: string

The callback that will be called when the API has been initialized, that is window.YOUR_CALLBACK. Default is __INIT_GMAP.

apiKey

Type: string

Your API key, provided by Google.

To-do

  • Make it possible to pass in a custom API endpoint.

Keywords

FAQs

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