I
I
IliaMal2020-09-21 06:06:52
1C-Bitrix
IliaMal, 2020-09-21 06:06:52

How to set up a Yandex.Maps custom property?

Hello.

The position on the map is filled in the news using the "Custom Yandex.Maps" property, while you can set only latitude and longitude, zoom changes are not saved:
5f68181b8d0ac377013360.png
A very large map scale is displayed on the news page, and there are no attributes in the array that allow you to change the scale:
5f6818a534074318681618.png

How to set the scale of the map I need?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PetrPo, 2020-09-22
@IliaMal

DISPLAY_VALUE = map.yandex.system component with default template, zoom is set there, default = 10
component.php
5f68625f8ad5e354492893.jpeg
tempate.php
5f68626bdd90b399986257.jpeg
Options for changing:
1. Use the map component, pass latitude and longitude from the property there and set the INIT_MAP_SCALE parameter with the desired scale
2. Throw in your site template the template of the map.yandex.system component with the name .default and change the zoom to the desired one in template.php

I
Ilya, 2020-09-21
@rpsv

In order to simplify the solution:
1. Use the standard zoom when displaying
2. Add another property with zoom
3. Extend the "Custom Yandex maps" property and add a zoom inside the property itself
If you need to show the street itself, then the zoom will be the same for everyone, if necessary show the locality - too, so it probably makes no sense to take it out separately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question