Skip to content

Commit

Permalink
Fix focusing issue - provide debug bounds getCenter method
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkim31 authored and prushfor committed Jan 24, 2023
1 parent c42aec7 commit 0082c58
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mapml/layers/DebugLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ export var debugVectors = function (options) {


var ProjectedExtent = L.Path.extend({

getCenter: function (round) {
let crs = this._map.options.crs;
return crs.unproject(L.bounds(this._locations).getCenter());

},

options: {
className: "mapml-debug-extent",
},
Expand Down

0 comments on commit 0082c58

Please sign in to comment.