1if (!window.BX_YMapAddPlacemark) 2{ 3 window.BX_YMapAddPlacemark = function(map, arPlacemark) 4 { 5 if (null == map) 6 return false; 7 8 if(!arPlacemark.LAT || !arPlacemark.LON) 9 return false; 10 11 var props = {}; 12 13 if (null != arPlacemark.TEXT && arPlacemark.TEXT.length > 0) 14 { 15 var value_view = ''; 16 17 if (arPlacemark.TEXT.length > 0) 18 { 19 var rnpos = arPlacemark.TEXT.indexOf("\n"); 20 value_view = rnpos <= 0 ? arPlacemark.TEXT : arPlacemark.TEXT.substring(0, rnpos); 21 } 22 23 props.balloonContent = arPlacemark.TEXT.replace(/\n/g, '<br />'); 24 props.hintContent = value_view; 25 } 26 27 var root = '/local/templates/aspro_optimus/images/map_marker.png'; 28 29 var obPlacemark = new ymaps.Placemark( 30 [arPlacemark.LAT, arPlacemark.LON], 31 props, 32 { 33 balloonCloseButton: true, 34 iconImageHref: root, 35 iconImageSize: [45, 57], 36 iconImageOffset: [-23, -57], 37 } 38 ); 39 40 map.geoObjects.add(obPlacemark); 41 42 return obPlacemark; 43 } 44} 45 46if (!window.BX_YMapAddPolyline) 47{ 48 window.BX_YMapAddPolyline = function(map, arPolyline) 49 { 50 if (null == map) 51 return false; 52 53 if (null != arPolyline.POINTS && arPolyline.POINTS.length > 1) 54 { 55 var arPoints = []; 56 for (var i = 0, len = arPolyline.POINTS.length; i < len; i++) 57 { 58 arPoints.push([arPolyline.POINTS[i].LAT, arPolyline.POINTS[i].LON]); 59 } 60 } 61 else 62 { 63 return false; 64 } 65 66 var obParams = {clickable: true}; 67 if (null != arPolyline.STYLE) 68 { 69 obParams.strokeColor = arPolyline.STYLE.strokeColor; 70 obParams.strokeWidth = arPolyline.STYLE.strokeWidth; 71 } 72 var obPolyline = new ymaps.Polyline( 73 arPoints, {balloonContent: arPolyline.TITLE}, obParams 74 ); 75 76 map.geoObjects.add(obPolyline); 77 78 return obPolyline; 79 } 80}
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.