Skip to content

Commit

Permalink
workaround for MAPCACHE-424, will keep in place until Leaflet/Leaflet…
Browse files Browse the repository at this point in the history
…#3575 is resolved
  • Loading branch information
caldwellc committed Dec 28, 2020
1 parent 9fc14bd commit 53dcfa6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,19 @@ L.Icon.Default.mergeOptions({
shadowUrl: markerShadow
})

/*
* Workaround for 1px lines appearing in some browsers due to fractional transforms
* and resulting anti-aliasing.
* https://github.com/Leaflet/Leaflet/issues/3575
*/
const originalInitTile = L.GridLayer.prototype._initTile
L.GridLayer.include({
_initTile: function (tile) {
originalInitTile.call(this, tile)
var tileSize = this.getTileSize()
tile.style.width = tileSize.x + 1 + 'px'
tile.style.height = tileSize.y + 1 + 'px'
}
})

export * as L from 'leaflet'

0 comments on commit 53dcfa6

Please sign in to comment.