@ppci-mock/google-maps

1.2.19 • Public • Published

Google Maps

Map component based on google maps api

Table of contents

  1. Installation
  2. Usage
  3. Properties
  4. Events

Installation

NPM

npm i @ppci-mock/google-maps

// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs

Usage

Javascript

import '@ppci-mock/google-maps';

Browser

<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/google-maps/builds/index.min.js" />

<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/google-maps/builds/legacy.min.js" />

<!-- Component -->
<google-maps
  apiKey=${String}
  .pins=${Array}
  @onLoad=${Function}
  @onZoomEnd=${Function}
  @onDragEnd=${Function}
></google-maps>

Properties

Property Type Description Possible Values
apiKey String Google maps api key
pins Array Categories you can filter on ``` [{ label: String, position: { lat: Coordinate, lng: Coordinate, }, onClick: Function, increaseZoom: Number, }] ```

Events

Name Description Payload
@onLoad On map ready ``` { ..., detail: { zoom: Number, topRight: { lat: Coordinate, lng: Coordinate }, bottomLeft: { lat: Coordinate, lng: Coordinate }, }, } ```
@onZoomEnd On zooming finished ``` { ..., detail: { zoom: Number, topRight: { lat: Coordinate, lng: Coordinate }, bottomLeft: { lat: Coordinate, lng: Coordinate }, }, } ```
@onDragEnd On dragging finished ``` { ..., detail: { zoom: Number, topRight: { lat: Coordinate, lng: Coordinate }, bottomLeft: { lat: Coordinate, lng: Coordinate }, }, } ```

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.190latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.190
1.2.170
1.2.160
1.2.150
1.2.140
1.2.130
1.2.120
1.2.110
1.2.100
1.2.90
1.2.80
1.2.70
1.2.60
1.2.50
1.2.40
1.2.30

Package Sidebar

Install

npm i @ppci-mock/google-maps

Weekly Downloads

0

Version

1.2.19

License

ISC

Unpacked Size

9.67 kB

Total Files

6

Last publish

Collaborators

  • fsevenhuysen
  • borai
  • franksevenhuysen