2.0.28 • Published 3 months ago

@googlemaps/markerwithlabel v2.0.28

Weekly downloads
3,500
License
Apache-2.0
Repository
github
Last release
3 months ago

Google Maps JavaScript MarkerWithLabel

npm Build Release codecov GitHub contributors semantic-release npm.io Discord

Description

The library provides Markers with labels for Google Maps Platform.

Note: This library is the nearly the same interface as the existing library @google/markerwithlabel, but renamed and in its own repository. All future development will continue here.

Note: There are some breaking changes from @google/markerwithlabel including anchor position. This should be considered a major version bump!

Install

Available via npm as the package @googlemaps/markerwithlabel.

npm i @googlemaps/markerwithlabel

or

yarn add @googlemaps/markerwithlabel

Alternatively you may add the umd package directly to the html document using the unpkg link.

<script src="https://unpkg.com/@googlemaps/markerwithlabel/dist/index.min.js"></script>

When adding via unpkg, the marker with labels can be accessed at new markerWithLabel.MarkerWithLabel().

A version can be specified by using https://unpkg.com/@googlemaps/markerwithlabel@VERSION/dist/....

Documentation

The reference documentation can be found at this link.

Example

import { MarkerWithLabel } from '@googlemaps/markerwithlabel';

new MarkerWithLabel({
    position: new google.maps.LatLng(49.475, -123.84),
    clickable: true,
    draggable: true,
    map: map,
    labelContent: "foo", // can also be HTMLElement
    labelAnchor: new google.maps.Point(-21, 3),
    labelClass: "labels", // the CSS class for the label
    labelStyle: { opacity: 1.0 },
})

View the package in action:

2.0.28

3 months ago

2.0.27

4 months ago

2.0.26

5 months ago

2.0.24

8 months ago

2.0.25

6 months ago

2.0.23

9 months ago

2.0.22

10 months ago

2.0.21

1 year ago

2.0.14

2 years ago

2.0.13

2 years ago

2.0.12

2 years ago

2.0.11

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.7

2 years ago

2.0.8

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.6

2 years ago

1.3.10

2 years ago

1.3.11

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.3.9

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.8

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

3 years ago

1.2.6

3 years ago

1.3.0

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago