google-maps

WebJar for google-maps

License

License

MIT
Categories

Categories

JavaScript Languages
GroupId

GroupId

org.webjars.bowergithub.carrooi
ArtifactId

ArtifactId

js-googlemapsloader
Last Version

Last Version

3.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

google-maps
WebJar for google-maps
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Carrooi/Js-GoogleMapsLoader

Download js-googlemapsloader

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.carrooi/js-googlemapsloader/ -->
<dependency>
    <groupId>org.webjars.bowergithub.carrooi</groupId>
    <artifactId>js-googlemapsloader</artifactId>
    <version>3.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.carrooi/js-googlemapsloader/
implementation 'org.webjars.bowergithub.carrooi:js-googlemapsloader:3.3.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.carrooi/js-googlemapsloader/
implementation ("org.webjars.bowergithub.carrooi:js-googlemapsloader:3.3.0")
'org.webjars.bowergithub.carrooi:js-googlemapsloader:jar:3.3.0'
<dependency org="org.webjars.bowergithub.carrooi" name="js-googlemapsloader" rev="3.3.0">
  <artifact name="js-googlemapsloader" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.carrooi', module='js-googlemapsloader', version='3.3.0')
)
libraryDependencies += "org.webjars.bowergithub.carrooi" % "js-googlemapsloader" % "3.3.0"
[org.webjars.bowergithub.carrooi/js-googlemapsloader "3.3.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

google-maps-loader

Async loader for google maps api written in typescript with promises.

This is an unofficial package first released when there was no official modern loader for google maps. This changed with @googlemaps/js-api-loader which is based on an older version of this package.

Version >= 4.0.0: Typescript definitions are published with this package. Install @types/google-maps for previous versions.

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

Browser only!

Installation

$ npm install --save google-maps

or with Pika:

<script type="module">
    import { Loader } from 'https://cdn.pika.dev/google-maps';
    // todo: see docs bellow
</script>

Usage

import {Loader, LoaderOptions} from 'google-maps';
// or const {Loader} = require('google-maps'); without typescript

const options: LoaderOptions = {/* todo */};
const loader = new Loader('my-api-key', options);

const google = await loader.load();
const map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8,
});

Without await/async:

loader.load().then(function (google) {
    const map = new google.maps.Map(document.getElementById('map'), {
        center: {lat: -34.397, lng: 150.644},
        zoom: 8,
    });
});

Options

Changelog list

  • 4.2.3

    • Add support for IE11 #78
  • 4.2.2

    • Allow authorization using clientID #77
  • 4.2.0

    • Add official types from @types/googlemaps
  • 4.1.1

    • Rebuild package
  • 4.1.0

    • Reject on load error
    • Reject on authentication error
  • 4.0.0

    • Rewrite in typescript with await/async support
  • 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
org.webjars.bowergithub.carrooi

Carrooi

Versions

Version
3.3.0
3.2.1