npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

google-maps-iso

v3.4.0

Published

Wrapper for asynchronously used Google Maps API

Downloads

3

Readme

google-maps-iso

npm version Travis CI Build Status Coverage Status

Wrapper for asynchronously used Google Maps API in browser.

This module does not change original google maps api in any way. It just provide easy way to load and use this API asynchronously.

Installation

Environment with common js:

$ npm install google-maps

Download and import one of these files into your .html file:

Usage

var GoogleMapsLoader = require('google-maps'); // only for common js environments

GoogleMapsLoader.load(function(google) {
	new google.maps.Map(el, options);
});

If you are not using environment with common js support, you can use GoogleMapsLoader variable directly. It is already in window object.

Options

Own API key

GoogleMapsLoader.KEY = 'qwertyuiopasdfghjklzxcvbnm';

Business API client

GoogleMapsLoader.CLIENT = 'yourclientkey';
GoogleMapsLoader.VERSION = '3.14';

Libraries

GoogleMapsLoader.LIBRARIES = ['geometry', 'places'];

Localization

GoogleMapsLoader.LANGUAGE = 'fr';

Region

GoogleMapsLoader.REGION = 'GB';

Unload google api

For testing purposes is good to remove all google objects and restore loader to its original state.

GoogleMapsLoader.release(function() {
	console.log('No google maps api around');
});

Events

onLoad

GoogleMapsLoader.onLoad(function(google) {
	console.log('I just loaded google maps api');
});

Tests

$ npm test

Changelog list

  • 3.2.1

    • Typo in readme
  • 3.2.0

    • Removed support for SENSOR parameter #34
    • Add support for REGION parameter #36
    • Removed deprecated promises API #24
    • Fix some testing cases #23
    • Typo in readme #22
  • 3.1.0

    • Fix mock google maps loader
    • Add language parameter #17
    • Fix typos at readme #19
    • Fix for IE 8 #21
    • Rename repository to Js-GoogleMapsLoader #15
  • 3.0.0

    • Register to bower registry
    • Moved to Carrooi organization
    • Using mocked loader, so tests are much faster
    • Optimized building request url
    • Some variables and methods are now private and not accessible from outside
    • Updated dependencies
    • Whole package is written in javascript, not coffeescript
  • 2.1.1

    • Sh**.... Forgot to increase version at package.json
  • 2.1.0

    • Added support for libraries #3 (thanks popara)
    • Added tests
    • Small optimization
  • 2.0.0

    • Added Maps API for Business support
    • Added standalone version for non common js environments
    • Removed dependency on q package
    • Using callback instead of promise
    • Added tests + travis
    • Added status badges
  • 1.0.0

    • Initial version

License

The MIT License (MIT)

Copyright (c) 2013 - 2016 David Kudera

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.