@uiw/react-baidu-map-geolocation-control
Version:
Baidu Map geolocation-control Components for React.
32 lines (31 loc) • 1.14 kB
JavaScript
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _useGeolocationControl = require("./useGeolocationControl");
Object.keys(_useGeolocationControl).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _useGeolocationControl[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _useGeolocationControl[key];
}
});
});
/// <reference types="@uiw/react-baidu-map-types" />
var _default = exports.default = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
const {
geolocationControl
} = (0, _useGeolocationControl.useGeolocationControl)(props);
(0, _react.useImperativeHandle)(ref, () => ({
...props,
geolocationControl
}), [geolocationControl, props]);
return null;
});
;