@evergis/react
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -9,3 +9,4 @@ "use strict"; | ||
const useLayerVisibility_1 = require("./useLayerVisibility"); | ||
function useEvergisDynamicLayer({ name, zIndex, isDisplayed, }) { | ||
const react_1 = require("react"); | ||
function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }) { | ||
const api = EvergisContext_1.useEvergisContext(); | ||
@@ -19,2 +20,5 @@ const { map } = MapContext_1.useMapContext(); | ||
useLayerVisibility_1.useLayerVisibility(layer, isDisplayed); | ||
react_1.useEffect(() => { | ||
layer.style = style; | ||
}, [style]); | ||
return layer; | ||
@@ -21,0 +25,0 @@ } |
@@ -1,6 +0,4 @@ | ||
import { EvergisDynamicLayer } from '@evergis/api/es/layers/EvergisDynamicLayer'; | ||
import { EvergisDynamicLayer, EvergisDynamicLayerParams } from '@evergis/api/es/layers/EvergisDynamicLayer'; | ||
import { LayerProps } from './LayerProps'; | ||
export declare function useEvergisDynamicLayer({ name, zIndex, isDisplayed, }: EvergisDynamicLayerProps): EvergisDynamicLayer; | ||
export declare type EvergisDynamicLayerProps = { | ||
name: string; | ||
} & LayerProps; | ||
export declare function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }: EvergisDynamicLayerProps): EvergisDynamicLayer; | ||
export declare type EvergisDynamicLayerProps = EvergisDynamicLayerParams & LayerProps; |
import { useProperty } from './useProperty'; | ||
import { useEvergisContext } from '../EvergisContext'; | ||
import { EvergisDynamicLayer } from '@evergis/api/es/layers/EvergisDynamicLayer'; | ||
import { EvergisDynamicLayer, } from '@evergis/api/es/layers/EvergisDynamicLayer'; | ||
import { useMapContext } from '../MapContext'; | ||
import { useLayerOrder } from './useLayerOrder'; | ||
import { useLayerVisibility } from './useLayerVisibility'; | ||
export function useEvergisDynamicLayer({ name, zIndex, isDisplayed, }) { | ||
import { useEffect } from 'react'; | ||
export function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }) { | ||
const api = useEvergisContext(); | ||
@@ -16,4 +17,7 @@ const { map } = useMapContext(); | ||
useLayerVisibility(layer, isDisplayed); | ||
useEffect(() => { | ||
layer.style = style; | ||
}, [style]); | ||
return layer; | ||
} | ||
//# sourceMappingURL=useEvergisDynamicLayer.js.map |
@@ -1,6 +0,4 @@ | ||
import { EvergisTileLayer } from '@evergis/api/es/layers/EvergisTileLayer'; | ||
import { EvergisTileLayer, EvergisTileLayerParams } from '@evergis/api/es/layers/EvergisTileLayer'; | ||
import { LayerProps } from './LayerProps'; | ||
export declare function useEvergisTileLayer({ name, zIndex, isDisplayed, }: EvergisTileLayerProps): EvergisTileLayer; | ||
export declare type EvergisTileLayerProps = { | ||
name: string; | ||
} & LayerProps; | ||
export declare type EvergisTileLayerProps = EvergisTileLayerParams & LayerProps; |
import { useProperty } from './useProperty'; | ||
import { useEvergisContext } from '../EvergisContext'; | ||
import { EvergisTileLayer } from '@evergis/api/es/layers/EvergisTileLayer'; | ||
import { EvergisTileLayer, } from '@evergis/api/es/layers/EvergisTileLayer'; | ||
import { useMapContext } from '../MapContext'; | ||
@@ -5,0 +5,0 @@ import { useLayerOrder } from './useLayerOrder'; |
{ | ||
"name": "@evergis/react", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "React components for creating GIS apps with evergis server", | ||
@@ -34,3 +34,3 @@ "author": "everpoint", | ||
"react-dom": ">=16.8.6", | ||
"@evergis/api": ">=0.1.12", | ||
"@evergis/api": ">=0.1.13", | ||
"@evergis/sgis": ">=0.5.0-alpha.1" | ||
@@ -49,3 +49,3 @@ }, | ||
"typescript": "^3.5.2", | ||
"@evergis/api": "^0.1.12" | ||
"@evergis/api": "^0.1.13" | ||
}, | ||
@@ -52,0 +52,0 @@ "browserslist": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80880
136
1051