Security News
Internet Archive Hacked, 31 Million Record Compromised
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
tilelayer-canvas
Advanced tools
Render Leaflet's tiles as <canvas>
elements.
If your project has a lot of layers, sometimes performance issues related to GPU may occurred. In our case the easiest way to avoid them is displaying map's tiles not as <img>
elements, but draw their on the <canvas>
. Just look:
You can install it via package manager:
npm install tilelayer-canvas
or
yarn add tilelayer-canvas
or just copy index.min.js
from this repository and include it by <script>
tag:
<script src="./path/to/index.min.js"></script>
Then in your project use L.tileLayer.canvas
instead of L.tileLayer
. That's it! See an example.
Name | Required | Default value | Description |
---|---|---|---|
timeout | No | undefined | Zoom debounce time. |
doubleSize | No | undefined | Set to true if tiles are 2x. |
1.1.5 - 19/03/2024
_tileOnError
if tile load fails. (@HandyMenny in #14)1.1.4 - 06/03/2024
1.1.3 - 23/09/2020
NaN
zoom value for layers with delay defined.1.1.2 - 29/07/2020
1.1.1 - 27/07/2020
clearTimeout
for delays.1.1.0 - 24/07/2020
timeout: Number - delay time (ms)
1.0.2 - 09/06/2020
complete
attribute to <canvas>
element (fixed blinked zoom issue).1.0.1 - 06/05/2020
MIT
FAQs
Render Leaflet's tiles as canvas elements.
The npm package tilelayer-canvas receives a total of 211 weekly downloads. As such, tilelayer-canvas popularity was classified as not popular.
We found that tilelayer-canvas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
Security News
TC39 is meeting in Tokyo this week and they have approved nearly a dozen proposals to advance to the next stages.
Security News
Our threat research team breaks down two malicious npm packages designed to exploit developer trust, steal your data, and destroy data on your machine.