From 1b85d63973d8f7f70d6f3c57c9500b3196dbc8bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:25:46 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20open-pio?= =?UTF-8?q?neer/trails-openlayers-base-packages@66f3918b88406b82afc3fcd915?= =?UTF-8?q?c144be7102be14=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n_pioneer_authentication.useAuthState.html | 2 +- ...r_experimental_layout_sidebar.Sidebar.html | 2 +- .../_open_pioneer_map.MapAnchor.html | 2 +- .../_open_pioneer_map.MapContainer.html | 2 +- .../_open_pioneer_map.getProjection.html | 2 +- ..._open_pioneer_map.registerProjections.html | 2 +- .../_open_pioneer_map.useCenter.html | 2 +- .../_open_pioneer_map.useMapModel.html | 2 +- .../_open_pioneer_map.useProjection.html | 2 +- .../_open_pioneer_map.useResolution.html | 2 +- .../functions/_open_pioneer_map.useScale.html | 2 +- ...r_map_test_utils.createServiceOptions.html | 2 +- ..._open_pioneer_map_test_utils.setupMap.html | 2 +- ...r_map_test_utils.waitForInitialExtent.html | 2 +- ...ioneer_map_test_utils.waitForMapMount.html | 2 +- .../_open_pioneer_notifier.Notifier.html | 2 +- ...oneer_ogc_features.createVectorSource.html | 2 +- ...pen_pioneer_react_utils.TitledSection.html | 2 +- ...r_react_utils.useCommonComponentProps.html | 2 +- .../_open_pioneer_react_utils.useEvent.html | 2 +- ...n_pioneer_react_utils.useHeadingLevel.html | 2 +- ...pen_pioneer_authentication.AuthEvents.html | 4 +-- ...pen_pioneer_authentication.AuthPlugin.html | 8 ++--- ...oneer_authentication.AuthPluginEvents.html | 4 +-- ...en_pioneer_authentication.AuthService.html | 10 +++--- ...authentication.AuthStateAuthenticated.html | 6 ++-- ...hentication.AuthStateNotAuthenticated.html | 4 +-- ...oneer_authentication.AuthStatePending.html | 4 +-- ...pioneer_authentication.ForceAuthProps.html | 8 ++--- ...en_pioneer_authentication.LoginEffect.html | 6 ++-- ..._pioneer_authentication.LoginFallback.html | 6 ++-- ...en_pioneer_authentication.SessionInfo.html | 10 +++--- ...basemap_switcher.BasemapSwitcherProps.html | 14 ++++---- ...ordinate_viewer.CoordinateViewerProps.html | 10 +++--- ...perimental_layout_sidebar.SidebarItem.html | 10 +++--- ...ntal_layout_sidebar.SidebarProperties.html | 10 +++--- .../_open_pioneer_map.CoordinateConfig.html | 8 ++--- .../_open_pioneer_map.ExtentConfig.html | 10 +++--- ..._open_pioneer_map.InitialExtentConfig.html | 6 ++-- ...pen_pioneer_map.InitialPositionConfig.html | 8 ++--- .../interfaces/_open_pioneer_map.Layer.html | 32 ++++++++--------- .../_open_pioneer_map.LayerBase.html | 26 +++++++------- .../_open_pioneer_map.LayerBaseConfig.html | 12 +++---- .../_open_pioneer_map.LayerBaseEvents.html | 16 ++++----- .../_open_pioneer_map.LayerCollection.html | 20 +++++------ ...pen_pioneer_map.LayerCollectionEvents.html | 4 +-- .../_open_pioneer_map.LayerConfig.html | 14 ++++---- ...pen_pioneer_map.LayerRetrievalOptions.html | 4 +-- .../_open_pioneer_map.MapAnchorProps.html | 16 ++++----- .../_open_pioneer_map.MapConfig.html | 10 +++--- .../_open_pioneer_map.MapConfigProvider.html | 6 ++-- .../_open_pioneer_map.MapContainerProps.html | 20 +++++------ .../_open_pioneer_map.MapModel.html | 14 ++++---- .../_open_pioneer_map.MapModelEvents.html | 10 +++--- .../_open_pioneer_map.MapPadding.html | 10 +++--- .../_open_pioneer_map.MapRegistry.html | 8 ++--- .../_open_pioneer_map.OlMapOptions.html | 4 +-- .../_open_pioneer_map.SimpleLayerConfig.html | 16 ++++----- ...en_pioneer_map.SimpleLayerConstructor.html | 6 ++-- .../_open_pioneer_map.Sublayer.html | 30 ++++++++-------- ..._open_pioneer_map.SublayersCollection.html | 4 +-- ...pioneer_map.SublayersCollectionEvents.html | 4 +-- .../_open_pioneer_map.UseMapModelLoading.html | 8 ++--- ..._open_pioneer_map.UseMapModelRejected.html | 8 ++--- ..._open_pioneer_map.UseMapModelResolved.html | 8 ++--- .../_open_pioneer_map.WMSLayer.html | 36 +++++++++---------- .../_open_pioneer_map.WMSLayerConfig.html | 18 +++++----- ..._open_pioneer_map.WMSLayerConstructor.html | 6 ++-- .../_open_pioneer_map.WMSSublayerConfig.html | 16 ++++----- ...eer_map_navigation.InitialExtentProps.html | 8 ++--- ...open_pioneer_map_navigation.ZoomProps.html | 10 +++--- ...oneer_map_test_utils.SimpleMapOptions.html | 18 +++++----- ..._pioneer_measurement.MeasurementProps.html | 12 +++---- ..._pioneer_notifier.NotificationOptions.html | 10 +++--- ..._pioneer_notifier.NotificationService.html | 6 ++-- .../_open_pioneer_notifier.NotifierProps.html | 4 +-- ..._ogc_features.OgcFeatureSourceOptions.html | 16 ++++----- ...neer_react_utils.CommonComponentProps.html | 6 ++-- ...act_utils.ConfigureTitledSectionProps.html | 6 ++-- ...oneer_react_utils.SectionHeadingProps.html | 4 +-- ...ioneer_react_utils.TitledSectionProps.html | 8 ++--- ...pioneer_scale_viewer.ScaleViewerProps.html | 8 ++--- .../modules/_open_pioneer_authentication.html | 2 +- .../_open_pioneer_basemap_switcher.html | 2 +- .../_open_pioneer_coordinate_viewer.html | 2 +- ...n_pioneer_experimental_layout_sidebar.html | 2 +- .../docs/modules/_open_pioneer_map.html | 2 +- .../modules/_open_pioneer_map_navigation.html | 2 +- .../modules/_open_pioneer_measurement.html | 2 +- .../docs/modules/_open_pioneer_notifier.html | 2 +- .../modules/_open_pioneer_ogc_features.html | 2 +- .../modules/_open_pioneer_react_utils.html | 4 +-- .../modules/_open_pioneer_scale_viewer.html | 2 +- ...er_authentication.AuthPluginEventBase.html | 2 +- ...open_pioneer_authentication.AuthState.html | 2 +- ..._pioneer_authentication.LoginBehavior.html | 2 +- .../_open_pioneer_map.InitialViewConfig.html | 2 +- .../_open_pioneer_map.LayerLoadState.html | 2 +- .../_open_pioneer_map.MapAnchorPosition.html | 2 +- ...open_pioneer_map.ProjectionDefinition.html | 2 +- .../types/_open_pioneer_map.SimpleLayer.html | 4 +-- .../_open_pioneer_map.UseMapModelResult.html | 2 +- ...en_pioneer_map_navigation.ZoomInProps.html | 2 +- ...n_pioneer_map_navigation.ZoomOutProps.html | 2 +- ...en_pioneer_notifier.NotificationLevel.html | 2 +- ...open_pioneer_react_utils.HeadingLevel.html | 2 +- .../_open_pioneer_map.SimpleLayer-1.html | 4 +-- .../_open_pioneer_map.WMSLayer-1.html | 4 +-- 108 files changed, 375 insertions(+), 375 deletions(-) diff --git a/openlayers-base-packages/docs/functions/_open_pioneer_authentication.useAuthState.html b/openlayers-base-packages/docs/functions/_open_pioneer_authentication.useAuthState.html index ee027d0f0..da46f79d9 100644 --- a/openlayers-base-packages/docs/functions/_open_pioneer_authentication.useAuthState.html +++ b/openlayers-base-packages/docs/functions/_open_pioneer_authentication.useAuthState.html @@ -30,7 +30,7 @@
Readonly
titleReadonly
Readonly
urlReadonly
Readonly
visibleReadonly
Optional
sourceOptional
Optional
sublayersOptional
Optional
visibleOptional
Optional
sublayersOptional
Optional
visibleOptional
Example: Center map to given coordinates using the map model.
import { useMapModel } from "@open-pioneer/map";
import { MAP_ID } from "./MapConfigProviderImpl";
export function AppUI() {
// mapState.map may be undefined initially, if the map is still configuring.
// the object may may also be in an "error" state.
const mapState = useMapModel(MAP_ID);
const centerBerlin = () => {
const olMap = mapState.map?.olMap;
if (olMap) {
olMap?.getView().fit([1489200, 6894026, 1489200, 6894026], { maxZoom: 13 });
}
};
}
-Apache-2.0 (see LICENSE
file)
You can also use the generic Zoom
component:
<Zoom mapId="map_id" zoomDirection="in" />
-Apache-2.0 (see LICENSE
file)
As an example, the following configuration will render completed features using black color and active ones using red color:
import { Fill, Stroke, Style } from "ol/style";
import { Measurement } from "@open-pioneer/measurement";
const BLACK_STYLE = new Style({
stroke: new Stroke({
color: "black",
width: 5
}),
fill: new Fill({
color: "rgba(0, 0, 0, 0.25)"
})
});
const RED_STYLE = new Style({
stroke: new Stroke({
color: "red",
width: 5
}),
fill: new Fill({
color: "rgba(255, 0, 0, 0.25)"
})
});
function AppUI() {
return (
// ...
<Measurement
mapId={MAP_ID}
activeFeatureStyle={RED_STYLE}
finishedFeatureStyle={BLACK_STYLE}
/>
);
}
-Apache-2.0 (see LICENSE
file)
All currently displayed notifications can be closed by calling the closeAll
method on the NotificationService
:
const notificationService = ...; // injected
notificationService.closeAll();
-Apache-2.0 (see LICENSE
file)
maxConcurrentRequests
.
Additional options of the VectorSource
(see OpenLayers documentation) can be given by the property
additionalOptions
.
Apache-2.0 (see LICENSE
file)
A helper hook that automatically computes containerProps
: common properties to set on the topmost container element of a public component.
For the time being, these properties are className
(combined component class and optional additional class names) and data-testid
(for tests).
Example:
-// SPDX-FileCopyrightText: con terra GmbH and contributors
// SPDX-License-Identifier: Apache-2.0
import { CommonComponentProps, useCommonComponentProps } from "@open-pioneer/react-utils";
// ...
// Inherit from CommonComponentProps
export interface InitialExtentProps extends CommonComponentProps {
mapId: string;
}
export const InitialExtent: FC<InitialExtentProps> = forwardRef(function InitialExtent(
props: InitialExtentProps,
ref: ForwardedRef<HTMLDivElement>
) {
const { mapId } = props;
// Use the hook to compute container props (classNames, data-testid, maybe more in the future)
const { containerProps } = useCommonComponentProps("initial-extent", props);
// Pass containerProps directly to the container
return <Box {...containerProps}>{/* ... */}</Box>;
});
+// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)
// SPDX-License-Identifier: Apache-2.0
import { CommonComponentProps, useCommonComponentProps } from "@open-pioneer/react-utils";
// ...
// Inherit from CommonComponentProps
export interface InitialExtentProps extends CommonComponentProps {
mapId: string;
}
export const InitialExtent: FC<InitialExtentProps> = forwardRef(function InitialExtent(
props: InitialExtentProps,
ref: ForwardedRef<HTMLDivElement>
) {
const { mapId } = props;
// Use the hook to compute container props (classNames, data-testid, maybe more in the future)
const { containerProps } = useCommonComponentProps("initial-extent", props);
// Pass containerProps directly to the container
return <Box {...containerProps}>{/* ... */}</Box>;
});
useEvent()
The useEvent
can be used to obtain a stable event handler function with changing implementation.
This is useful to avoid re-triggering useEffect
-hooks when only the event handler changed.
@@ -39,7 +39,7 @@ Module @open-pioneer/react-utils - v0.0.1
import { useEvent } from "@open-pioneer/react-utils";
function someReactComponent(props) {
// NOTE: logMessage() must not be called during rendering!
const logMessage = useEvent((message: string) => {
console.log(message, props.someProperty);
});
const someService = ...; // injected
// Changes of prop.someProperty will not cause the effect to re-fire, because the function identity
// of `logMessage` remains stable.
useEffect(() => {
const handle = someService.registerHandler(logMessage);
return () => handle.destroy();
}, [someService, logMessage]);
}
For more details, see the API docs of useEvent
or https://github.com/reactjs/rfcs/blob/useevent/text/0000-useevent.md.
-License
+License
Apache-2.0 (see LICENSE
file)
To integrate the scale viewer in your app, insert the following snippet and reference a map ID:
<ScaleViewer mapId="map_id" />
-Apache-2.0 (see LICENSE
file)