Advertisement
Guest User

Untitled

a guest
Jul 18th, 2022
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function addMarker(e, s, t, o) {
  2.         o = o, s = s;
  3.         var a, r = e[4],
  4.             n = e[2],
  5.             i = (e[3], new google.maps.LatLng(e[0], e[1])),
  6.             l = {
  7.                 mf_begin_work: e[4],
  8.                 mf_end_work: e[5],
  9.                 sat_begin_work: e[6],
  10.                 sat_end_work: e[7],
  11.                 sun_begin_work: e[8],
  12.                 sun_end_work: e[9]
  13.             },
  14.             c = e[10],
  15.             d = e[11],
  16.             p = e[12],
  17.             m = e[16],
  18.             u = e[13],
  19.             f = e[14],
  20.             h = e[15],
  21.             g = (e[1], e[17]),
  22.             v = e[18],
  23.             y = e[19],
  24.             k = e[20],
  25.             b = e[21],
  26.             C = e[22],
  27.             w = e[23],
  28.             T = e[24],
  29.             _ = e[25],
  30.             S = (e[27], e[28]),
  31.             L = {
  32.                 url: "",
  33.                 scaledSize: new google.maps.Size(22.869, 30.492)
  34.             };
  35.         "true" === f ? (L.url = pinUrl + "/assets/images/icons/transparent_circle.svg", marker1 = new google.maps.Marker({
  36.             position: i,
  37.             map: s,
  38.             icon: L,
  39.             label: {
  40.                 color: "#ffffff",
  41.                 fontFamily: "Hind Guntur",
  42.                 fontStyle: "normal",
  43.                 fontWeight: "600",
  44.                 fontSize: "18px",
  45.                 text: h
  46.             },
  47.             pinNum: h,
  48.             loyalty_card_shops: v,
  49.             name: d,
  50.             slug: y,
  51.             barNum: k,
  52.             barLoyaltyNum: b,
  53.             gasNum: C,
  54.             gasLoyaltyNum: w,
  55.             simpleShopNum: T,
  56.             simpleShopLoyaltyNum: _,
  57.             clickable: !1
  58.         })) : (L.url = "", "shop" === p ? "true" === u ? (L.url = pinUrl + "/assets/images/icons/blue-pin-1-star.svg", L.scaledSize = new google.maps.Size(27.229103, 31.335612)) : L.url = pinUrl + "/assets/images/icons/blue-pin-1.svg" : "bar" === p ? "true" === u ? (L.url = pinUrl + "/assets/images/icons/green-pin-1-star.svg", L.scaledSize = new google.maps.Size(27.229103, 31.335612)) : L.url = pinUrl + "/assets/images/icons/green-pin-1.svg" : "gas" === p && ("true" === u ? (L.url = pinUrl + "/assets/images/icons/red-pin-1-star.svg", L.scaledSize = new google.maps.Size(27.229103, 31.335612)) : L.url = pinUrl + "/assets/images/icons/red-pin-1.svg"), a = m, marker1 = new google.maps.Marker({
  59.             title: m,
  60.             position: i,
  61.             tip: r,
  62.             hours: l,
  63.             map: s,
  64.             icon: L,
  65.             visible: !1,
  66.             loyalty_card: u,
  67.             catValue: p,
  68.             county_name: c,
  69.             showAfterCardFilter: !0
  70.         }));
  71.         gmarkers1.push(marker1);
  72.         var I = "";
  73. (I =
  74.   "" !== l.mf_begin_work &&
  75.   "" !== l.mf_end_work &&
  76.   "" !== l.sat_begin_work &&
  77.   "" !== l.sat_end_work &&
  78.   "" !== l.sun_begin_work &&
  79.   "" !== l.sun_end_work
  80.     ? '<p class="mContent__worktime--label">Darbo laikas: </p><ul class="mContent__worktime--list"><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">I-V </span><span class="mContent__worktime--time">' +
  81.       l.mf_begin_work +
  82.       " - " +
  83.       l.mf_end_work +
  84.       '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VI </span><span class="mContent__worktime--time">' +
  85.       l.sat_begin_work +
  86.       " - " +
  87.       l.sat_end_work +
  88.       '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
  89.       l.sun_begin_work +
  90.       " - " +
  91.       l.sun_end_work +
  92.       "</span></li></ul>"
  93.     : "" !== l.mf_begin_work &&
  94.       "" !== l.mf_end_work &&
  95.       "" !== l.sat_begin_work &&
  96.       "" !== l.sat_end_work
  97.      
  98.     ? '<p class="mContent__worktime--label">Darbo laikas: </p><ul class="mContent__worktime--list"><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">I-VI </span><span class="mContent__worktime--time">' +
  99.       l.mf_begin_work +
  100.       " - " +
  101.       l.mf_end_work +
  102.       '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
  103.       l.sat_begin_work +
  104.       " - " +
  105.       l.sat_end_work +
  106.       "</span></li></ul>"
  107.     : "" !== l.mf_begin_work &&
  108.       "" !== l.mf_end_work &&
  109.       "" !== l.sun_begin_work &&
  110.       "" !== l.sun_end_work
  111.     ? '<p class="mContent__worktime--label">Darbo laikas: </p><ul class="mContent__worktime--list"><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">I-VI </span><span class="mContent__worktime--time">' +
  112.       l.mf_begin_work +
  113.       " - " +
  114.       l.mf_end_work +
  115.       '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
  116.       l.sun_begin_work +
  117.       " - " +
  118.       l.sun_end_work +
  119.       "</span></li></ul>"
  120.     : '<p class="mContent__worktime--label">Darbo laikas: </p><ul class="mContent__worktime--list"><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">I-VII </span><span class="mContent__worktime--time">' +
  121.       l.mf_begin_work +
  122.       " - " +
  123.       l.mf_end_work +
  124.       "</span></li></ul>"),
  125.   S &&
  126.     ((I += '<ul class="mContent__worktime--list">'),
  127.     (I +=
  128.       '<li class="mContent__worktime--listItem"><span class="mContent__worktime--day">' +
  129.       S +
  130.       " </span></li>"),
  131.     (I += "</ul>"));
  132. var x =
  133.   '<div class="mContent"><div class="mContent__top">' +
  134.   ("true" === u
  135.     ? '<span class="icon"></span><p class="mContent__top--name">' + a + "</p>"
  136.     : '<p class="mContent__top--name">' + a + "</p>") +
  137.   '</div><div class="mContent__address"><p style="font-size: 13px" class="mContent__address--name"><span>Adresas:</span> <br>' +
  138.   n +
  139.   '</p></div><div class="mContent__worktime">' +
  140.   I +
  141.   '</div><p class="mContent__contact" style="font-weight: 600">Tel.: <a href="tel:' +
  142.   g +
  143.   '" class="mContent__contact--link">' +
  144.   g +
  145.   '</a></p><p class="mContent__directions"><a target="_blank" href="https://www.google.com/maps/dir/?api=1&destination=' +
  146.   e[0] +
  147.   "," +
  148.   e[1] +
  149.   '&travelmode=driving" class="mContent__contact--link">Rodyti per Google Maps</a></p></div>';
  150.         infoWindowClosed = !0, google.maps.Map.prototype.panToWithOffset = function(a, s, o) {
  151.             var r = this,
  152.                 e = new google.maps.OverlayView;
  153.             e.onAdd = function() {
  154.                 var e = this.getProjection(),
  155.                     t = e.fromLatLngToContainerPixel(a);
  156.                 t.x = t.x + s, t.y = t.y + o, r.panTo(e.fromContainerPixelToLatLng(t))
  157.             }, e.draw = function() {}, e.setMap(this)
  158.         }, google.maps.event.addListener(marker1, "click", function() {
  159.             if (startMarkerRadius && startMarkerRadius.visible) {
  160.                 var a = this.position;
  161.                 google.maps.geometry.spherical.computeDistanceBetween(new google.maps.LatLng(yourPlace.lat, yourPlace.lng), a) <= 1e3 * selectedRadius && directionsService.route({
  162.                     origin: {
  163.                         lat: yourPlace.lat,
  164.                         lng: yourPlace.lng
  165.                     },
  166.                     destination: a,
  167.                     travelMode: google.maps.TravelMode.DRIVING
  168.                 }, function(e, t) {
  169.                     "OK" == t && (directionsRenderer.setDirections(e), directionsRenderer.setMap(s), showDirectionsLink(a.lat(), a.lng()))
  170.                 })
  171.             }
  172.             "false" === f && (o.close(s), o.setContent(x), o.open(s, this), marker1.open = !0, s.panToWithOffset(this.getPosition(), 0, -180))
  173.         })
  174.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement