PageSourceSearch

https://vashpatent.ru/bitrix/templates/aspro-allcorp2/components/bitrix/map.yandex.view/map/script.js

js vashpatent.ru collected 2026-10-04 21:53:39 UTC 2,848 bytes, 100 lines download raw bytes

1
2window.BX_YMapAddPlacemark = function(map, arPlacemark, isClustered){
3	if (null == map)
4		return false;
5
6	if(!arPlacemark.LAT || !arPlacemark.LON)
7		return false;
8
9	var props = {};
10
11	
12	if (null != arPlacemark.TEXT && arPlacemark.TEXT.length > 0)
13	{
14		var value_view = '';
15
16		if (arPlacemark.TEXT.length > 0)
17		{
18			var rnpos = arPlacemark.TEXT.indexOf("\n");
19			value_view = rnpos <= 0 ? arPlacemark.TEXT : arPlacemark.TEXT.substring(0, rnpos);
20		}
21
22		props.balloonContent = arPlacemark.TEXT.replace(/\n/g, '<br />');
23		props.hintContent = value_view;
24	}
25
26	if (null != arPlacemark.HTML && arPlacemark.HTML.length > 0)
27	{
28		props.balloonContent = arPlacemark.HTML;
29	}
30
31	var option = {
32		item: arPlacemark.ITEM_ID,
33		// hideIconOnBalloonOpen: false,
34		hasHint: false,
35		// hasBalloon: false,
36	};
37	
38	if(typeof ymaps !== 'undefined' && arAllcorp2Options['THEME']['DEFAULT_MAP_MARKET'] != 'Y')
39	{
40		var markerSVG = ymaps.templateLayoutFactory.createClass([
41		'<svg xmlns="http://www.w3.org/2000/svg" width="44" height="55" class="marker dynamic" viewBox="0 0 44 55">',
42		'<defs><style>.mcls-1,.mcls-3{fill:#fff;}.mcls-1,.mcls-2{fill-rule:evenodd;}.mcls-2{opacity: 0.75;fill:#fff;}.mcls-1{fill: #ff6307;}</style></defs>',
43		'<path class="mcls-2" d="M44,23.051c0,15.949-22,31.938-22,31.938S0.009,39,.009,23.051c0-.147.019-0.29,0.022-0.436C0.025,22.409,0,22.208,0,22A22,22,0,0,1,19.627.132,19.174,19.174,0,0,1,24.5.152,22,22,0,0,1,44,22c0,0.172-.022.338-0.026,0.509S44,22.869,44,23.051Z"></path>',
44		'<path class="mcls-1" d="M42,23.393c0,13.424-20,29.6-20,29.6s-20-16.174-20-29.6c0-.209.024-0.414,0.03-0.623C2.029,22.513,2,22.26,2,22a20,20,0,0,1,40,0c0,0.227-.026.448-0.034,0.673C41.974,22.914,42,23.151,42,23.393Z"></path>',
45		'<circle class="mcls-3" cx="22" cy="22" r="11"></circle>',
46		'</svg>'
47		].join(''));
48
49		option.iconImageSize = [46, 57];
50		option.iconLayout = markerSVG;
51
52	}
53	
54	var obPlacemark = new ymaps.Placemark(
55		[arPlacemark.LAT, arPlacemark.LON],
56		props,
57		option,
58		{balloonCloseButton: true}
59	);
60
61	if(!isClustered) { map.geoObjects.add(obPlacemark); }
62
63	return obPlacemark;
64}
65
66if (!window.BX_YMapAddPolyline)
67{
68	window.BX_YMapAddPolyline = function(map, arPolyline)
69	{
70		if (null == map)
71			return false;
72
73		if (null != arPolyline.POINTS && arPolyline.POINTS.length > 1)
74		{
75			var arPoints = [];
76			for (var i = 0, len = arPolyline.POINTS.length; i < len; i++)
77			{
78				arPoints.push([arPolyline.POINTS[i].LAT, arPolyline.POINTS[i].LON]);
79			}
80		}
81		else
82		{
83			return false;
84		}
85
86		var obParams = {clickable: true};
87		if (null != arPolyline.STYLE)
88		{
89			obParams.strokeColor = arPolyline.STYLE.strokeColor;
90			obParams.strokeWidth = arPolyline.STYLE.strokeWidth;
91		}
92		var obPolyline = new ymaps.Polyline(
93			arPoints, {balloonContent: arPolyline.TITLE}, obParams
94		);
95
96		map.geoObjects.add(obPolyline);
97
98		return obPolyline;
99	}
100}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.