This package has been deprecated

Author message:

Moved to fetch-google-maps

kist-loader-maps

1.0.0 • Public • Published

kist-loader-maps

Build Status Browserstack

Simple maps loader. Wrapper around basic Google Maps fetching.

Install

npm install kist-loader-maps --save

Usage

var loadMaps = require('kist-loader-maps');
 
loadMaps({
    apiKey: 'YOUR_GOOGLE_API_KEY',
    language: 'en',
    libraries: 'geometry'
}).then(function ( maps ) {
    var map = new maps.Map(document.getElementById('map'), {
        zoom: 8,
        center: new maps.LatLng(-34.397, 150.644)
    });
});

API

loadMaps(options)

Returns: Promise

options

Type: Object

apiKey

Type: String
Required

Google API key.

version

Type: Number
Default: 3

Google Maps API version.

language

Type: String
Default: 'en'

Language for Google Maps UI.

libraries

Type: String[]

List of Google Maps libraries to load.

Test

For manual tests, run npm test -- --watch and open http://localhost:9000/ in your browser.

Browser support

Tested in IE8+ and all modern browsers.

Uses Promises so you need to apply polyfill.

License

MIT © Ivan Nikolić

Readme

Keywords

Package Sidebar

Install

npm i kist-loader-maps

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • niksy