Socket
Socket
Sign inDemoInstall

@react-google-maps/marker-clusterer

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-google-maps/marker-clusterer - npm Package Compare versions

Comparing version 1.9.3 to 2.0.0-alpha

2

dist/Clusterer.d.ts

@@ -82,3 +82,3 @@ /// <reference types="googlemaps" />

createClusters(iFirst: number): void;
extend(obj1: any, obj2: any): any;
extend(obj1: unknown, obj2: unknown): unknown;
}

@@ -27,3 +27,3 @@ 'use strict';

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -46,3 +46,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -53,3 +53,3 @@

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -62,6 +62,4 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -88,3 +86,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -96,10 +94,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -119,4 +117,3 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
google.maps.event.addDomListener(this.div, 'mouseover', function () {
/**

@@ -129,6 +126,4 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
/**

@@ -179,4 +174,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '',
divTitle = ''; // NOTE: values must be specified in px units
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units

@@ -195,4 +190,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -204,3 +199,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -245,3 +240,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -263,3 +258,3 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -315,3 +310,3 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -439,3 +434,3 @@ this.clusterIcon.setMap(null);

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -522,3 +517,3 @@ dv = parseInt(dv, 10) / 10;

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -534,3 +529,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -541,6 +536,5 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'zoom_changed', function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -553,5 +547,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -561,10 +555,8 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'idle', function () {
_this.redraw();
})];
} // eslint-disable-next-line @getify/proper-arrows/this
;
};

@@ -593,6 +585,7 @@ _proto.onRemove = function onRemove() {

this.ready = false;
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
};
_proto.draw = function draw() {};
_proto.draw = function draw() {
return;
};

@@ -623,3 +616,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -777,2 +770,3 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -793,3 +787,2 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -877,3 +870,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -998,7 +991,7 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1020,4 +1013,3 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.timerRefStatic = window.setTimeout(function () {
_this3.createClusters(iLast);

@@ -1046,7 +1038,9 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1053,0 +1047,0 @@

@@ -25,3 +25,3 @@ var ClusterIcon =

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -44,3 +44,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

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

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -60,6 +60,4 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -86,3 +84,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -94,10 +92,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -117,4 +115,3 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
google.maps.event.addDomListener(this.div, 'mouseover', function () {
/**

@@ -127,6 +124,4 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
/**

@@ -177,4 +172,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '',
divTitle = ''; // NOTE: values must be specified in px units
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units

@@ -193,4 +188,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -202,3 +197,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -243,3 +238,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -261,3 +256,3 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -313,3 +308,3 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -437,3 +432,3 @@ this.clusterIcon.setMap(null);

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -520,3 +515,3 @@ dv = parseInt(dv, 10) / 10;

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -532,3 +527,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -539,6 +534,5 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'zoom_changed', function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -551,5 +545,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -559,10 +553,8 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'idle', function () {
_this.redraw();
})];
} // eslint-disable-next-line @getify/proper-arrows/this
;
};

@@ -591,6 +583,7 @@ _proto.onRemove = function onRemove() {

this.ready = false;
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
};
_proto.draw = function draw() {};
_proto.draw = function draw() {
return;
};

@@ -621,3 +614,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -775,2 +768,3 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -791,3 +785,2 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -875,3 +868,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -996,7 +989,7 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1018,4 +1011,3 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.timerRefStatic = window.setTimeout(function () {
_this3.createClusters(iLast);

@@ -1044,7 +1036,9 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1051,0 +1045,0 @@

@@ -31,3 +31,3 @@ (function (global, factory) {

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -50,3 +50,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -57,3 +57,3 @@

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -66,6 +66,4 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
cMouseDownInCluster = false;

@@ -92,3 +90,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -100,10 +98,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -123,4 +121,3 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
google.maps.event.addDomListener(this.div, 'mouseover', function () {
/**

@@ -133,6 +130,4 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
/**

@@ -183,4 +178,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '',
divTitle = ''; // NOTE: values must be specified in px units
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units

@@ -199,4 +194,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -208,3 +203,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -249,3 +244,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -267,3 +262,3 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -319,3 +314,3 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -443,3 +438,3 @@ this.clusterIcon.setMap(null);

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -526,3 +521,3 @@ dv = parseInt(dv, 10) / 10;

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -538,3 +533,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -545,6 +540,5 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'zoom_changed', function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -557,5 +551,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -565,10 +559,8 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.getMap(), 'idle', function () {
_this.redraw();
})];
} // eslint-disable-next-line @getify/proper-arrows/this
;
};

@@ -597,6 +589,7 @@ _proto.onRemove = function onRemove() {

this.ready = false;
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
};
_proto.draw = function draw() {};
_proto.draw = function draw() {
return;
};

@@ -627,3 +620,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -781,2 +774,3 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -797,3 +791,2 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -881,3 +874,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1002,7 +995,7 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1024,4 +1017,3 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
this.timerRefStatic = window.setTimeout(function () {
_this3.createClusters(iLast);

@@ -1050,7 +1042,9 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -1057,0 +1051,0 @@

{
"name": "@react-google-maps/marker-clusterer",
"sideEffects": false,
"version": "1.9.3",
"version": "2.0.0-alpha",
"description": "Marker Clusterer for React.js Google Maps API",

@@ -59,3 +59,4 @@ "license": "MIT",

"awesome-typescript-loader": "5.2.1",
"eslint": "7.1.0",
"eslint": "7.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-config-standard": "14.1.1",

@@ -66,10 +67,16 @@ "eslint-config-standard-react": "9.2.0",

"eslint-plugin-babel": "5.3.0",
"eslint-plugin-chai-expect": "2.1.0",
"eslint-plugin-cypress": "2.11.1",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-html": "6.0.2",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jest": "23.13.2",
"eslint-plugin-json": "2.1.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-no-inferred-method-name": "2.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.0",
"eslint-plugin-perf-standard": "1.0.3",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-promise": "4.2.1",

@@ -80,3 +87,6 @@ "eslint-plugin-react": "7.20.0",

"eslint-plugin-react-perf": "3.2.3",
"eslint-plugin-security-node": "1.0.12",
"eslint-plugin-standard": "4.0.1",
"eslint-plugin-tree-shaking": "1.8.0",
"eslint-plugin-xss": "0.1.10",
"eslint-plugin-you-dont-need-lodash-underscore": "6.10.0",

@@ -83,0 +93,0 @@ "jest": "26.0.1",

@@ -1,2 +0,1 @@

/* eslint-disable filenames/match-exported */
/**

@@ -3,0 +2,0 @@ * @name MarkerClusterer for Google Maps V3

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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