useOlTranslate
useOlTranslate():
Translate
Defined in: src/ol-translate.tsx:107
Hook to access the OpenLayers Translate interaction instance from the nearest parent OlTranslate component. Must be used within a descendant of OlTranslate/OlLayerTranslate.
Returns
Section titled “Returns”Translate
The OpenLayers Translate interaction instance
Throws
Section titled “Throws”If called outside of an OlTranslate/OlLayerTranslate component
Example
Section titled “Example”function TranslateControl() { const translate = useOlTranslate() // Use translate instance return null}