-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] Show spatial filters on map to provide context when for active…
… filters (#63406) (#64250) * [Maps] show spatial filters * pass data into __dataRequests * extractFeaturesFromFilters * geo_shape support * putting it all together * lower alpha * update removeOrphanedSourcesAndLayers to avoid removing spatialFiltersLayer * change array iteration to forEach * use less precision when distance filter covers larger distances * fix double import * add map settings for to configure spatial filters layer * add map settings alpha slider * finish rest of map settings * review feedback Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
fc6c0b9
commit 7aebc4f
Showing
16 changed files
with
463 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiFormRow } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
// @ts-ignore | ||
import { ValidatedRange } from './validated_range'; | ||
|
||
interface Props { | ||
alpha: number; | ||
onChange: (alpha: number) => void; | ||
} | ||
|
||
export function AlphaSlider({ alpha, onChange }: Props) { | ||
const onAlphaChange = (newAlpha: number) => { | ||
onChange(newAlpha / 100); | ||
}; | ||
|
||
return ( | ||
<EuiFormRow | ||
label={i18n.translate('xpack.maps.layerPanel.settingsPanel.layerTransparencyLabel', { | ||
defaultMessage: 'Opacity', | ||
})} | ||
display="columnCompressed" | ||
> | ||
<ValidatedRange | ||
min={0} | ||
max={100} | ||
step={1} | ||
value={Math.round(alpha * 100)} | ||
onChange={onAlphaChange} | ||
showInput | ||
showRange | ||
compressed | ||
append={i18n.translate('xpack.maps.layerPanel.settingsPanel.percentageLabel', { | ||
defaultMessage: '%', | ||
description: 'Percentage', | ||
})} | ||
/> | ||
</EuiFormRow> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.