Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lazymaps

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazymaps - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "lazymaps",
"version": "0.2.0",
"version": "0.2.1",
"description": "Lazy loading, easy to use wrapper around the Google Maps API.",

@@ -5,0 +5,0 @@ "main": "dist/lazymaps.js",

@@ -22,15 +22,38 @@ [![Build Status](https://travis-ci.org/maykinmedia/lazymaps.svg?branch=master)](https://travis-ci.org/maykinmedia/lazymaps)

## Usage
## Usage
*Code examples in es6, library is es5 compatible.*
*See [doc](doc/) for full API documentation.*
*See [doc](https://github.com/maykinmedia/lazymaps/blob/master/doc/lazymaps.md) for full API documentation.*
**HTML**
**HTML: Basic map**
```html
<!-- data-coordinates and data-zoom are required. -->
<div class="map" data-coordinates="52.3766882,4.8855208,17" data-zoom="15"></div>
<div class="map" data-coordinates="52.3766849,4.8855208" data-zoom="17"></div>
```
**HTML: Adding markers**
```html
<div class="map"
data-coordinates="52.3766849,4.8855208"
data-zoom="17"
data-markers='[{
"latitude": 52.3766849,
"longitude": 4.8855208,
"title": "Maykin Media",
"description": "Awesome webdevelopment",
}]'
></div>
```
**HTML: Additional parameters**
`data-disable-default-ui="true"`: Disables the default UI controls.
`data-disable-info-windows="true`: Disables info windows (see result of new GMap(node, apiKey) to access internal objects like map and markers.
**JS: Creating a single map**

@@ -51,3 +74,3 @@

```js
import GMap from 'lazymaps';
import { lazymaps } from 'lazymaps';

@@ -60,2 +83,7 @@

**JS: Customizing the map.**
`new GMap(node, apikey)` returns a `Promise` object, lazymaps(selector, apiKey) returns an array of these promises. The resulting promises are resolved with the GMap instance. This can be used for further map customisation, please refer the API documentation [doc](https://github.com/maykinmedia/lazymaps/blob/master/doc/lazymaps.md) for available properties.
## Running tests

@@ -62,0 +90,0 @@

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