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