mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-01-28 10:01:38 +00:00
sync
This commit is contained in:
16
node_modules/react-leaflet/lib/GeoJSON.js
generated
vendored
Normal file
16
node_modules/react-leaflet/lib/GeoJSON.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createElementObject, createPathComponent, extendContext } from '@react-leaflet/core';
|
||||
import { GeoJSON as LeafletGeoJSON } from 'leaflet';
|
||||
export const GeoJSON = createPathComponent(function createGeoJSON({ data , ...options }, ctx) {
|
||||
const geoJSON = new LeafletGeoJSON(data, options);
|
||||
return createElementObject(geoJSON, extendContext(ctx, {
|
||||
overlayContainer: geoJSON
|
||||
}));
|
||||
}, function updateGeoJSON(layer, props, prevProps) {
|
||||
if (props.style !== prevProps.style) {
|
||||
if (props.style == null) {
|
||||
layer.resetStyle();
|
||||
} else {
|
||||
layer.setStyle(props.style);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user