Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function addMarker(e, s, t, o) {
- o = o, s = s;
- var a, r = e[4],
- n = e[2],
- i = (e[3], new google.maps.LatLng(e[0], e[1])),
- l = {
- mf_begin_work: e[4],
- mf_end_work: e[5],
- sat_begin_work: e[6],
- sat_end_work: e[7],
- sun_begin_work: e[8],
- sun_end_work: e[9]
- },
- c = e[10],
- d = e[11],
- p = e[12],
- m = e[16],
- u = e[13],
- f = e[14],
- h = e[15],
- g = (e[1], e[17]),
- v = e[18],
- y = e[19],
- k = e[20],
- b = e[21],
- C = e[22],
- w = e[23],
- T = e[24],
- _ = e[25],
- S = (e[27], e[28]),
- L = {
- url: "",
- scaledSize: new google.maps.Size(22.869, 30.492)
- };
- "true" === f ? (L.url = pinUrl + "/assets/images/icons/transparent_circle.svg", marker1 = new google.maps.Marker({
- position: i,
- map: s,
- icon: L,
- label: {
- color: "#ffffff",
- fontFamily: "Hind Guntur",
- fontStyle: "normal",
- fontWeight: "600",
- fontSize: "18px",
- text: h
- },
- pinNum: h,
- loyalty_card_shops: v,
- name: d,
- slug: y,
- barNum: k,
- barLoyaltyNum: b,
- gasNum: C,
- gasLoyaltyNum: w,
- simpleShopNum: T,
- simpleShopLoyaltyNum: _,
- clickable: !1
- })) : (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({
- title: m,
- position: i,
- tip: r,
- hours: l,
- map: s,
- icon: L,
- visible: !1,
- loyalty_card: u,
- catValue: p,
- county_name: c,
- showAfterCardFilter: !0
- }));
- gmarkers1.push(marker1);
- var I = "";
- (I =
- "" !== l.mf_begin_work &&
- "" !== l.mf_end_work &&
- "" !== l.sat_begin_work &&
- "" !== l.sat_end_work &&
- "" !== l.sun_begin_work &&
- "" !== l.sun_end_work
- ? '<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">' +
- l.mf_begin_work +
- " - " +
- l.mf_end_work +
- '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VI </span><span class="mContent__worktime--time">' +
- l.sat_begin_work +
- " - " +
- l.sat_end_work +
- '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
- l.sun_begin_work +
- " - " +
- l.sun_end_work +
- "</span></li></ul>"
- : "" !== l.mf_begin_work &&
- "" !== l.mf_end_work &&
- "" !== l.sat_begin_work &&
- "" !== l.sat_end_work
- ? '<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">' +
- l.mf_begin_work +
- " - " +
- l.mf_end_work +
- '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
- l.sat_begin_work +
- " - " +
- l.sat_end_work +
- "</span></li></ul>"
- : "" !== l.mf_begin_work &&
- "" !== l.mf_end_work &&
- "" !== l.sun_begin_work &&
- "" !== l.sun_end_work
- ? '<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">' +
- l.mf_begin_work +
- " - " +
- l.mf_end_work +
- '</span></li><li class="mContent__worktime--listItem"><span class="mContent__worktime--day">VII </span><span class="mContent__worktime--time">' +
- l.sun_begin_work +
- " - " +
- l.sun_end_work +
- "</span></li></ul>"
- : '<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">' +
- l.mf_begin_work +
- " - " +
- l.mf_end_work +
- "</span></li></ul>"),
- S &&
- ((I += '<ul class="mContent__worktime--list">'),
- (I +=
- '<li class="mContent__worktime--listItem"><span class="mContent__worktime--day">' +
- S +
- " </span></li>"),
- (I += "</ul>"));
- var x =
- '<div class="mContent"><div class="mContent__top">' +
- ("true" === u
- ? '<span class="icon"></span><p class="mContent__top--name">' + a + "</p>"
- : '<p class="mContent__top--name">' + a + "</p>") +
- '</div><div class="mContent__address"><p style="font-size: 13px" class="mContent__address--name"><span>Adresas:</span> <br>' +
- n +
- '</p></div><div class="mContent__worktime">' +
- I +
- '</div><p class="mContent__contact" style="font-weight: 600">Tel.: <a href="tel:' +
- g +
- '" class="mContent__contact--link">' +
- g +
- '</a></p><p class="mContent__directions"><a target="_blank" href="https://www.google.com/maps/dir/?api=1&destination=' +
- e[0] +
- "," +
- e[1] +
- '&travelmode=driving" class="mContent__contact--link">Rodyti per Google Maps</a></p></div>';
- infoWindowClosed = !0, google.maps.Map.prototype.panToWithOffset = function(a, s, o) {
- var r = this,
- e = new google.maps.OverlayView;
- e.onAdd = function() {
- var e = this.getProjection(),
- t = e.fromLatLngToContainerPixel(a);
- t.x = t.x + s, t.y = t.y + o, r.panTo(e.fromContainerPixelToLatLng(t))
- }, e.draw = function() {}, e.setMap(this)
- }, google.maps.event.addListener(marker1, "click", function() {
- if (startMarkerRadius && startMarkerRadius.visible) {
- var a = this.position;
- google.maps.geometry.spherical.computeDistanceBetween(new google.maps.LatLng(yourPlace.lat, yourPlace.lng), a) <= 1e3 * selectedRadius && directionsService.route({
- origin: {
- lat: yourPlace.lat,
- lng: yourPlace.lng
- },
- destination: a,
- travelMode: google.maps.TravelMode.DRIVING
- }, function(e, t) {
- "OK" == t && (directionsRenderer.setDirections(e), directionsRenderer.setMap(s), showDirectionsLink(a.lat(), a.lng()))
- })
- }
- "false" === f && (o.close(s), o.setContent(x), o.open(s, this), marker1.open = !0, s.panToWithOffset(this.getPosition(), 0, -180))
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement