bento-charts
Version:
Charts library for Bento-platform
22 lines • 1.09 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { MapContainer } from 'react-leaflet';
import L, { Point } from 'leaflet';
import BentoOSMTileLayer from './BentoOSMTileLayer';
import iconPng from 'leaflet/dist/images/marker-icon.png';
import icon2XPng from 'leaflet/dist/images/marker-icon-2x.png';
import iconShadowPng from 'leaflet/dist/images/marker-shadow.png';
var defaultIcon = L.icon({
iconUrl: iconPng,
iconRetinaUrl: icon2XPng,
iconSize: new Point(25, 41),
iconAnchor: new Point(12, 41),
popupAnchor: new Point(1, -41),
shadowUrl: iconShadowPng,
});
L.Marker.prototype.options.icon = defaultIcon;
var BentoMapContainer = function (_a) {
var height = _a.height, center = _a.center, zoom = _a.zoom, children = _a.children, tileLayer = _a.tileLayer;
return (_jsxs(MapContainer, { style: { height: height }, center: center, zoom: zoom, children: [tileLayer !== null && tileLayer !== void 0 ? tileLayer : _jsx(BentoOSMTileLayer, {}), children] }));
};
export default BentoMapContainer;
//# sourceMappingURL=BentoMapContainer.js.map