mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-01-27 01:22:18 +00:00
sync
This commit is contained in:
12
node_modules/react-leaflet/lib/TileLayer.js
generated
vendored
Normal file
12
node_modules/react-leaflet/lib/TileLayer.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user