dependabot[bot]
4938bede46
|
4 years ago | |
---|---|---|
.github | 4 years ago | |
e2e | 4 years ago | |
examples | 4 years ago | |
src | 4 years ago | |
.babelrc | 4 years ago | |
.eslintrc.json | 4 years ago | |
.gitignore | 4 years ago | |
.releaserc | 4 years ago | |
CONTRIBUTING.md | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
jest.config.js | 4 years ago | |
package-lock.json | 4 years ago | |
package.json | 4 years ago | |
rollup.config.js | 4 years ago | |
tsconfig.json | 4 years ago | |
typedoc.js | 4 years ago |
README.md
Google Maps JavaScript MarkerWithLabel
Description
The library creates and manages per-zoom-level clusters for large amounts of markers.
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 consider a major version bump!
Install
Available via npm as the package @googlemaps/markerwithlabel.
npm i @googlemaps/markerwithlabel
or
yarn add @googlemaps/markerwithlabel
Alternativly 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 loader can be accessed at MarkerClusterer
.
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
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: