Download demo-frontend/node_modules/react-leaflet/lib/TileLayer.js from LarryD123/OurData: direct link, hf CLI and curl.
- Browser
- Download file 610 Bytes
-
https://huggingface.co/datasets/LarryD123/OurData/resolve/main/demo-frontend/node_modules/react-leaflet/lib/TileLayer.js
- Command line
-
hf download hf://datasets/LarryD123/OurData/demo-frontend/node_modules/react-leaflet/lib/TileLayer.js
-
curl -L -o TileLayer.js https://huggingface.co/datasets/LarryD123/OurData/resolve/main/demo-frontend/node_modules/react-leaflet/lib/TileLayer.js
610 Bytes
| import { createElementObject, createTileLayerComponent, updateGridLayer, withPane } from '@react-leaflet/core'; | |
| import { TileLayer as LeafletTileLayer } from 'leaflet'; | |
| export const TileLayer = createTileLayerComponent(function createTileLayer({ url, ...options }, context) { | |
| const layer = new LeafletTileLayer(url, withPane(options, context)); | |
| return createElementObject(layer, context); | |
| }, function updateTileLayer(layer, props, prevProps) { | |
| updateGridLayer(layer, props, prevProps); | |
| const { url } = props; | |
| if (url != null && url !== prevProps.url) { | |
| layer.setUrl(url); | |
| } | |
| }); | |