Skip to content

Commit dd0ec0b

Browse files
committed
feat: customize zoom in map listing variation
1 parent 05f63c6 commit dd0ec0b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/components/ItaliaTheme/Blocks/Listing/MapTemplate.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const MapTemplate = ({
3030
titleLine,
3131
show_map_full_width,
3232
map_size = 'medium',
33+
zoom = 15,
3334
linkmore_id_lighthouse,
3435
}) => {
3536
const intl = useIntl();
@@ -91,6 +92,7 @@ const MapTemplate = ({
9192
<OSMMap
9293
markers={markers}
9394
showTooltip
95+
zoom={zoom}
9496
mapOptions={{
9597
scrollWheelZoom: false,
9698
// tap: false,

src/config/Blocks/ListingOptions/mapTemplate.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ export const addMapTemplateOptions = (schema, formData, intl, position = 1) => {
3838
);
3939
pos++;
4040

41+
addSchemaField(
42+
schema,
43+
'zoom',
44+
intl.formatMessage(messages.zoom),
45+
null,
46+
{ type: 'number', default: 15 },
47+
pos,
48+
);
49+
pos++;
50+
4151
addSchemaField(
4252
schema,
4353
'map_size',

0 commit comments

Comments
 (0)