Styles...
This commit is contained in:
parent
6e64c8dd4c
commit
82e38308a4
|
@ -351,7 +351,17 @@ const styles = {
|
||||||
if (icon === undefined) {
|
if (icon === undefined) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return new Style({
|
return [
|
||||||
|
new Style({
|
||||||
|
image: new Circle({
|
||||||
|
radius: 28,
|
||||||
|
fill: new Fill({
|
||||||
|
color: isHighlighted ? [174, 33, 219, 0.7] : [255, 255, 255, 0.3],
|
||||||
|
}),
|
||||||
|
displacement: isHighlighted ? [0, +0] : [0, +3],
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
new Style({
|
||||||
image: new Icon({
|
image: new Icon({
|
||||||
src: icon,
|
src: icon,
|
||||||
scale: isHighlighted ? 2 : 1,
|
scale: isHighlighted ? 2 : 1,
|
||||||
|
@ -372,7 +382,8 @@ const styles = {
|
||||||
backgroundFill: poiTextFill,
|
backgroundFill: poiTextFill,
|
||||||
})
|
})
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
}),
|
||||||
|
];
|
||||||
}, memoizeOptions),
|
}, memoizeOptions),
|
||||||
},
|
},
|
||||||
cluster: {
|
cluster: {
|
||||||
|
@ -389,13 +400,13 @@ const styles = {
|
||||||
const { nbFeatures } = params;
|
const { nbFeatures } = params;
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new Circle({
|
image: new Circle({
|
||||||
radius: 15,
|
radius: 12,
|
||||||
fill: new Fill({ color: [174, 33, 219, 0.7] }),
|
fill: new Fill({ color: [174, 33, 219, 0.7] }),
|
||||||
}),
|
}),
|
||||||
text: new Text({
|
text: new Text({
|
||||||
text: `${nbFeatures}`,
|
text: `${nbFeatures}`,
|
||||||
font: 'bold 14px "Open Sans", "Arial Unicode MS", "sans-serif"',
|
font: 'bold 18px "Open Sans", "Arial Unicode MS", "sans-serif"',
|
||||||
offsetY: +0,
|
offsetY: +2,
|
||||||
padding: [0, 0, 0, 0],
|
padding: [0, 0, 0, 0],
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'black',
|
color: 'black',
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const mapTileProviders: TileProviders = {
|
||||||
language: 'int',
|
language: 'int',
|
||||||
source: new XYZ({
|
source: new XYZ({
|
||||||
minZoom: 0,
|
minZoom: 0,
|
||||||
maxZoom: 20,
|
maxZoom: 16,
|
||||||
url: 'https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
url: 'https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue