@h21-map/google-drawing-manager
Advanced tools
Comparing version 25.1.0 to 30.1.0
26
index.js
@@ -155,18 +155,9 @@ let drawModeMarker = "marker"; | ||
DrawingManager.prototype._fitBoundsArea = function (coordinates) { | ||
DrawingManager.prototype._fitBoundsCircle = function () { | ||
const me = this; | ||
let bounds = new google.maps.LatLngBounds(); | ||
for (var n = 0; n < coordinates.length; n++) { | ||
bounds.extend(coordinates[n]); | ||
} | ||
me.map.panToBounds(bounds); | ||
me.map.fitBounds(bounds); | ||
if (!me._circle) { return; } | ||
me.map.fitBounds(me._circle.getBounds()); | ||
google.maps.event.trigger(me, 'draw:circle_create', this._getInfo()); | ||
}, | ||
DrawingManager.prototype._fitBoundsCircle = function () { | ||
const me = this; | ||
if (!me._circle) { return; } | ||
me.map.fitBounds(me._circle.getBounds()); | ||
}, | ||
DrawingManager.prototype._setPosition = function (e) { | ||
@@ -263,6 +254,5 @@ const me = this; | ||
google.maps.event.clearListeners(me.map.getDiv(), 'mousedown'); | ||
google.maps.event.trigger(me, 'draw:area_create', me._convertCoordinates(me.vertexCount)); | ||
me.map.setOptions({ draggableCursor: me.map.get('draggableCursor') }); | ||
me.areaOptions.fitBounds && me._fitBoundsArea(); | ||
me._fitBoundsArea(); | ||
@@ -416,3 +406,3 @@ if (me.isMoreArea) { | ||
} | ||
google.maps.event.trigger(me, 'draw:area_create', me._convertCoordinates(me.vertexCount)); | ||
}, | ||
@@ -454,2 +444,3 @@ | ||
center, | ||
zoom: me.map.getZoom(), | ||
} | ||
@@ -588,3 +579,3 @@ return arrayArea; | ||
me._circle.setMap(me.map); | ||
google.maps.event.trigger(me, 'draw:circle_create', this._getInfo()); | ||
// google.maps.event.trigger(me, 'draw:circle_create', this._getInfo()); | ||
me._circle.bindTo('center', me._centerMarker, 'position'); | ||
@@ -951,2 +942,3 @@ | ||
position, | ||
zoom: me.map.getZoom(), | ||
}; | ||
@@ -953,0 +945,0 @@ |
{ | ||
"name": "@h21-map/google-drawing-manager", | ||
"scope": "@h21-map", | ||
"version": "25.1.0", | ||
"version": "30.1.0", | ||
"description": "A library of Google Map JS API", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33589
803