You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
439 B
17 lines
439 B
import { toBounds } from "../../../utils";
|
|
import { Props } from "./";
|
|
|
|
export function useInit(props: Props, attrs: Record<string, unknown>) {
|
|
const { url, minZoom, maxZoom, errorTileUrl, opacity, zIndex, bounds } = props;
|
|
const instance = new T.TileLayer.TDT(url, {
|
|
minZoom,
|
|
maxZoom,
|
|
errorTileUrl,
|
|
opacity,
|
|
zIndex,
|
|
bounds: bounds.length ? toBounds(bounds) : undefined,
|
|
...attrs
|
|
});
|
|
return instance;
|
|
}
|