PluginProbe
WP Directory Kit / 1.3.3
WP Directory Kit v1.3.3
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / public / js / wpdirectorykit-public.js

wpdirectorykit-public.js in WP Directory Kit 1.3.3, at public/js/wpdirectorykit-public.js

682 lines 25.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function( $ ) {
2 'use strict';
3
4 /**
5 * All of the code for your public-facing JavaScript source
6 * should reside in this file.
7 *
8 * Note: It has been assumed you will write jQuery code here, so the
9 * $ function reference has been prepared for usage within the scope
10 * of this function.
11 *
12 * This enables you to define handlers, for when the DOM is ready:
13 *
14 * $(function() {
15 *
16 * });
17 *
18 * When the window is loaded:
19 *
20 * $( window ).load(function() {
21 *
22 * });
23 *
24 * ...and/or other possibilities.
25 *
26 * Ideally, it is not considered best practise to attach more than a
27 * single DOM-ready or window-load handler for a particular page.
28 * Although scripts in the WordPress core, Plugins and Themes may be
29 * practising this, we should strive to set a better example in our own work.
30 */
31
32 $(function () {
33 $('.wdk-click-load-animation').on('click', function () {
34 $(this).find('.fa-ajax-indicator').css('display', 'inline-block');
35
36 if ($(this).closest('form').length) {
37 if (!$(this).closest('form')[0].checkValidity()) {
38 $(this).find('.fa-ajax-indicator').css('display', 'none');
39 }
40 }
41 });
42
43 $('.wdk-form-animation').on('submit', function () {
44 var form, indicator;
45 form = $(this);
46 indicator = form.find('.fa-ajax-indicator');
47 indicator.css('display', 'inline-block');
48
49 if(form[0].checkValidity())
50 indicator.css('display', 'none');
51 });
52
53
54 $('.wdk-submit-loading').on('click', function () {
55 var form;
56 form = $(this).closest('form');
57
58 if( $(this).hasClass('wdk_btn_load_indicator')) {
59 console.log('disabled')
60 return false;
61 }
62
63 $(this).addClass('wdk_btn_load_indicator disabled');
64 });
65
66 $('.wdk-click-loading').on('click', function (e) {
67
68 if( $(this).hasClass('wdk_btn_load_indicator')) {
69 return false;
70 }
71 $(this).addClass('wdk_btn_load_indicator disabled');
72 });
73
74 const wdk_start_search = (form) => {
75 var url,scrollTo, data = {};
76 url = form.attr('action').replace(/#results/, '');
77 if (url.indexOf('?') == -1) {
78 url += '?';
79 } else {
80 url += '&';
81 }
82 var str_parameters = "";
83 $.each($("form.wdk-search-form:visible").serializeArray(), function (i, k) {
84 if (k.value != '' && k.name.indexOf('skip') == -1) {
85 if (str_parameters != "") {
86 str_parameters += "&";
87 }
88 str_parameters += k.name + "=" + encodeURIComponent(k.value);
89 }
90 });
91
92 $.each($(".wdk-search-popup .toggle-btn:visible"), function (i, k) {
93 let el = $($(this).attr('data-wdk-target'));
94 if(el && el.length) {
95 $.each(el.find('.wdk-search-form').serializeArray(), function (i, k) {
96 if (k.value != '' && k.name.indexOf('skip') == -1) {
97 if (str_parameters != "") {
98 str_parameters += "&";
99 }
100 str_parameters += k.name + "=" + encodeURIComponent(k.value);
101 }
102 });
103 }
104 });
105
106 /* view_type */
107 if($('.wmvc-view-type .nav-link.active').length) {
108 str_parameters += "&wmvc_view_type="+$('.wmvc-view-type .nav-link.active').attr('data-id');
109 }
110
111 /* order by */
112 if($('.wdk-order').val() != '' && $('.wdk-order').val()) {
113 str_parameters += "&order_by="+$('.wdk-order').val();
114 }
115
116 if ($('.wdk-search-form[data-scrollto]').length)
117 scrollTo = '#'+$('.wdk-search-form[data-scrollto]').attr('data-scrollto');
118
119
120
121 var setCookie = (cname, cvalue, exdays) => {
122 var d = new Date();
123 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
124 var expires = "expires="+d.toUTCString();
125 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
126 }
127 setCookie('wdk_last_search', str_parameters);
128
129 return url+str_parameters+scrollTo;
130 }
131
132 /* set current page for search results if exists results widget and enabled in setttings*/
133 if($('form.wdk-search-form').length && $('.wdk-listings-results').length && $("form.wdk-search-form").attr('data-current-link') != '') {
134 $('form.wdk-search-form').attr('action', $("form.wdk-search-form").attr('data-current-link'));
135 }
136
137 $("form.wdk-search-form").on('submit', function (e) {
138 e.preventDefault();
139 var url = wdk_start_search($(this));
140 $(this).closest('form').addClass('loading')
141 if (decodeURI(window.location.href) == decodeURI(url)) {
142 window.location.reload();
143 } else {
144 window.location.href = url;
145 }
146 return false;
147 });
148
149 $("form.wdk-search-form.auto_search").find('input, select').on('input', function (e) {
150 $("form.wdk-search-form").first().trigger('submit')
151 });
152
153 $("form.wdk-search-form .wdk-search-start").on('click', function (e) {
154 e.preventDefault();
155 var url = wdk_start_search($(this).closest('form'));
156 $(this).closest('form').addClass('loading')
157
158 if($(this).closest('.ajax_results_enabled').length) {
159 if (typeof wdk_ajax_loading_listings == 'function') {
160 wdk_ajax_loading_listings(url);
161 }
162 } else if (decodeURI(window.location.href) == decodeURI(url)) {
163 window.location.reload(url);
164 } else {
165 window.location.href = url;
166 }
167 return false;
168 })
169
170 $('.wdk-listings-results.ajax_results_enabled .wdk-pagination .page-numbers').on('click', function (e) {
171 e.preventDefault();
172 if (typeof wdk_ajax_loading_listings == 'function') {
173 wdk_ajax_loading_listings($(this).attr('href'));
174 }
175 })
176
177 /* elementor popup */
178 jQuery( document ).on( 'elementor/popup/show', () => {
179 wdk_reset_form();
180 } );
181
182 const wdk_reset_form = () => {
183 $("form.wdk-search-form .wdk-search-reset").off().on('click', function (e) {
184 e.preventDefault();
185 let this_form = jQuery(this).closest('form');
186 this_form.find('input:not([type="checkbox"]):not([name="element_id"]):not([type="radio"]):not([type="hidden"]),textarea,select').val('');
187 this_form.find('select').val(jQuery(this).find('option:first').val()).trigger('change')
188 this_form.find('input[type="checkbox"]').prop('checked', false);
189 this_form.find('input[type="radio"]').prop('checked', false);
190 this_form.find('.wdk-field.LOCATION .wdk_dropdown_tree button:first-child').html(this_form.find('.wdk-field.LOCATION .list_items li:first').text());
191 this_form.find('.wdk-field.CATEGORY .wdk_dropdown_tree button:first-child').html(this_form.find('.wdk-field.CATEGORY .list_items li:first').text());
192 this_form.find('input[name="rectangle_ne"],input[name="rectangle_sw"] ').val('');
193
194 return false;
195 })
196 };
197 wdk_reset_form();
198
199 /* date time fields init */
200 if ($('.wdk-fielddate').length && typeof $.datepicker != 'undefined') {
201
202 $('.wdk-fielddate').each(function () {
203 let dateFormat = script_parameters.format_date_js;
204 var self = $(this);
205
206 if (self.attr('date-format'))
207 dateFormat = self.attr('date-format');
208
209 self.datepicker({ dateFormat: dateFormat, onSelect: function() {
210 self.parent().find('.db-date').val(wdk_date_sql_normalize(self.datepicker("getDate"), self)).trigger('input');
211 }
212 }).on( "change", function() {
213 self.parent().find('.db-date').val(wdk_date_sql_normalize(self.datepicker("getDate"), self));
214 });
215
216 if(self.parent().find('.db-date').val() == '') {
217 self.parent().find('.db-date').val(wdk_date_notime_sql_normalize());
218 }
219 })
220 } ;
221
222
223 if ($('.wdk-fielddatetime').length && typeof $.datepicker != 'undefined') {
224
225 $('.wdk-fielddatetime').each(function () {
226 let dateFormat = script_parameters.format_datetime_js;
227
228 var self = $(this);
229 if (self.attr('date-format'))
230 dateFormat = self.attr('date-format');
231
232 self.datepicker({ dateFormat: dateFormat, onSelect: function() {
233 var datetime = wdk_date_notime_sql_normalize(self.datepicker("getDate"), self);
234 if(self.parent().find('[name="hours_mask"]').val() !='') {
235 datetime += ' '+wdk_pad(self.parent().find('[name="hours_mask"]').val());
236 } else {
237 datetime += ' 00';
238 }
239 if(self.parent().find('[name="minutes_mask"]').val() !='') {
240 datetime += ':'+wdk_pad(self.parent().find('[name="minutes_mask"]').val());
241 } else {
242 datetime += ':00';
243 }
244 datetime += ':00';
245
246 self.parent().find('.db-date').val(datetime).trigger('input');
247 }
248 }).on( "change", function() {
249
250 var datetime = wdk_date_notime_sql_normalize(self.datepicker("getDate"), self);
251 if(self.parent().find('[name="hours_mask"]').val() !='') {
252 datetime += ' '+wdk_pad(self.parent().find('[name="hours_mask"]').val());
253 } else {
254 datetime += ' 00';
255 }
256 if(self.parent().find('[name="minutes_mask"]').val() !='') {
257 datetime += ':'+wdk_pad(self.parent().find('[name="minutes_mask"]').val());
258 } else {
259 datetime += ':00';
260 }
261 datetime += ':00';
262 self.parent().find('.db-date').val(datetime);
263 });
264
265 if(self.parent().find('.db-date').val() == '') {
266 self.parent().find('.db-date').val(wdk_date_sql_normalize());
267 }
268
269 self.parent().find('[name="hours_mask"],[name="minutes_mask"]').on('input', function(){
270 var datetime = wdk_date_notime_sql_normalize(self.datepicker("getDate"), self);
271 if(self.parent().find('[name="hours_mask"]').val() !='') {
272 datetime += ' '+wdk_pad(self.parent().find('[name="hours_mask"]').val());
273 } else {
274 datetime += ' 00';
275 }
276 if(self.parent().find('[name="minutes_mask"]').val() !='') {
277 datetime += ':'+wdk_pad(self.parent().find('[name="minutes_mask"]').val());
278 } else {
279 datetime += ':00';
280 }
281 datetime += ':00';
282 self.parent().find('.db-date').val(datetime);
283 });
284 })
285 };
286
287 if ($('.wdk-fielddate_from').length && $('.wdk-fielddate_to').length && typeof $.datepicker != 'undefined') {
288 var dateFormat, from, to;
289 const getDate = ( element ) => {
290 var date;
291 try {
292 date = $.datepicker.parseDate( dateFormat, element.value );
293 } catch( error ) {
294 date = null;
295 }
296 return date;
297 }
298
299 dateFormat = script_parameters.format_date_js;
300 if ($('.wdk-fielddate_from').attr('date-format'))
301 dateFormat = $('.wdk-fielddate_from').attr('date-format');
302
303 from = $('.wdk-fielddate_from')
304 .datepicker({
305 dateFormat: dateFormat,
306 onSelect: function( selectedDate ) {
307 to.datepicker("option", "minDate", selectedDate );
308 setTimeout(function(){
309 to.datepicker('show');
310 }, 16);
311
312 from.parent().find('.db-date').val(wdk_date_sql_normalize(from.datepicker("getDate"), from));
313 wdk_date_add_hours(from);
314 }
315 }).on( "change", function() {
316 from.parent().find('.db-date').val(wdk_date_sql_normalize(from.datepicker("getDate"), from)).trigger('input');
317 });
318
319 to = $('.wdk-fielddate_to').datepicker({
320 dateFormat: dateFormat
321 })
322 .on( "change", function() {
323 from.datepicker( "option", "maxDate", getDate( this ) );
324 to.parent().find('.db-date').val(wdk_date_sql_normalize(to.datepicker("getDate"), to)).trigger('input');
325 wdk_date_add_hours(to);
326 });
327
328 if(to.parent().find('.db-date').val() == '') {
329 to.parent().find('.db-date').val(wdk_date_sql_normalize());
330 }
331
332 if(from.parent().find('.db-date').val() == '') {
333 from.parent().find('.db-date').val(wdk_date_sql_normalize());
334 }
335
336 from.parent().find('[name="hours_mask"],[name="minutes_mask"]').on('input', function(){
337 wdk_date_add_hours(from);
338 });
339
340 to.parent().find('[name="hours_mask"],[name="minutes_mask"]').on('input', function(){
341 wdk_date_add_hours(to);
342 });
343 }
344 if(typeof $.fn.wdkSuggestion == 'function') {
345
346 if(typeof script_parameters.settings_wdk_field_search_suggestion_disable != 'undefined' && script_parameters.settings_wdk_field_search_suggestion_disable == 1) {
347
348 } else {
349 $('#wdk_field_search').wdkSuggestion({
350 ajax_url: script_parameters.ajax_url,
351 ajax_param: {
352 "action": 'wdk_public_action',
353 "page": 'wdk_frontendajax',
354 "function": 'search_suggestion',
355 },
356 language_id: '',
357 text_search: 'Search',
358 callback_selected: function(key) {
359
360 }
361 });
362 }
363
364 }
365
366 $('.wdk-control[type="number"]').on('change',function(){
367 let val = $(this).val();
368 let step = 1;
369 if(val.length>=7){
370 step = 10000;
371 } else if(val.length>=4) {
372 step = 10;
373 }
374 $(this).attr('step', step);
375 })
376
377
378 if(typeof $.fn.fieldSliderRange == 'function' && typeof $.fn.ionRangeSlider == 'function') {
379 $('.wdk-slider-range-field').fieldSliderRange();
380 }
381
382 wdk_result_listings_thumbnail_slider();
383
384 /* if video exists on thumbnail css trick */
385 $('.wdk-listing-card .wdk-thumbnail .wdk-image.media').find('iframe,video').css('padding-bottom', +($('.wdk-listing-card .wdk-thumbnail .wdk-over-image-bottom').outerHeight())+'px');
386
387
388 if(typeof $.fn.WdkScrollMobileSwipe == 'function') {
389 $('.WdkScrollMobileSwipe_enable').WdkScrollMobileSwipe();
390 $('.WdkScrollMobileSwipe_elementor_enable .elementor-container').WdkScrollMobileSwipe();
391 }
392
393 if($('.wl-menu-toggle').length) {
394 $('.wdk-footer-menu .wdk_mobile_footer_menu_gumb-open').addClass('trigger')
395 $('.wdk-footer-menu .wdk_mobile_footer_menu_gumb-open').on('click', function(e){
396 e.preventDefault();
397 $('.wl-menu-toggle').trigger('click');
398 });
399 }
400
401
402 /* Read More Button */
403 jQuery('.wdk-field-value.TEXTAREA').each(function(){
404 // Find the target div containing additional content
405 var moreContentDiv = $(this).find("[id*='more-']");
406 // Hide the additional content initially
407 var additionalContent = moreContentDiv.nextUntil(":not(p)");
408 additionalContent.hide();
409
410 // Create a "Read More" button
411 var readMoreButtonWrapper = $("<div class='wdk-textarea-load-more-wrapper'><a class='wdk-textarea-load-more-button'></a></div>"),
412 readMoreButton = readMoreButtonWrapper.find('a').text(script_parameters.text.read_more);
413 readMoreButton.on("click", function() {
414 // Toggle the visibility of the additional content
415 additionalContent.slideToggle();
416 if (readMoreButton.text() === script_parameters.text.read_more) {
417 readMoreButton.text(script_parameters.text.read_less);
418 } else {
419 readMoreButton.text(script_parameters.text.read_more);
420 }
421 });
422
423 // Replace the target div with the "Read More" button
424 moreContentDiv.before(readMoreButtonWrapper);
425 moreContentDiv.remove();
426 });
427 });
428
429 })(jQuery);
430
431 /* slider for result listings thumbnails */
432 if (typeof wdk_result_listings_thumbnail_slider != 'function') {
433 var wdk_result_listings_thumbnail_slider = ($wrapper = 'body') => {
434 if(typeof jQuery.fn.slick == 'function') {
435 jQuery('.wdk_js_gallery_slider_box', $wrapper).each(function(){
436 var _this = jQuery(this);
437
438 if($wrapper == 'body') {
439 if(_this.closest('.wdk_results_listings_slider_ini').length){return true;}
440 }
441
442 if(false && _this.closest('.slick-slide').hasClass('slick-cloned')){return true;}
443
444 if(_this.find('.wdk_js_gallery_slider').hasClass('slick-initialized')) {
445 _this.find('.wdk_js_gallery_slider').slick("unslick");
446 }
447
448 _this.find('.wdk_js_gallery_slider').slick({
449 dots: true,
450 infinite: true,
451 speed: 500,
452 fade: true,
453 arrows: true,
454 cssEase: 'linear',
455 nextArrow: _this.find('.wdk_js_gallery_slider-carousel_arrows .wdk-slider-next'),
456 prevArrow: _this.find('.wdk_js_gallery_slider-carousel_arrows .wdk-slider-prev'),
457 });
458 });
459 }
460 };
461 }
462 /*
463 Fix for slick slider, event after init slick
464
465 @param object el slick object
466 @param function callback
467 */
468
469 if (typeof wdk_slick_slider_init != 'function') {
470 var wdk_slick_slider_init = (el, callback) => {
471 try {
472 el.slick("slickGoTo", 0, true);
473 }
474 catch(error) {
475 setTimeout(wdk_slick_slider_init, 1000);
476 return;
477 }
478
479 if(callback) {
480 callback.call();
481 }
482 };
483 }
484 if (typeof wdk_pad != 'function') {
485 var wdk_pad = (num = '') => {
486 return ('00'+num).slice(-2);
487 };
488 }
489
490 if (typeof wdk_date_add_hours != 'function') {
491 var wdk_date_add_hours = (selector = '') => {
492 if(typeof selector !='undefined' && selector.parent().find('[name="hours_mask"]').length) {
493 var datetime = wdk_date_notime_sql_normalize(selector.datepicker("getDate"), selector);
494 if(selector.parent().find('[name="hours_mask"]').val() !='') {
495 datetime += ' '+wdk_pad(selector.parent().find('[name="hours_mask"]').val());
496 } else {
497 datetime += ' 00';
498 }
499 if(selector.parent().find('[name="minutes_mask"]').val() !='') {
500 datetime += ':'+wdk_pad(selector.parent().find('[name="minutes_mask"]').val());
501 } else {
502 datetime += ':00';
503 }
504 datetime += ':00';
505 selector.parent().find('.db-date').val(datetime);
506 }
507 };
508 }
509 /*
510 Convert date to sql format
511
512 @param string $date, string of date
513
514 @return string normalize date or Current date/time
515 */
516 if (typeof wdk_date_sql_normalize != 'function') {
517 var wdk_date_sql_normalize = (date = '', datepicker_el = null) => {
518 if(date == '') {
519 var d = new Date();
520 } else {
521 var d = new Date(date);
522 }
523
524 if(d == 'Invalid Date' && datepicker_el) {
525 var d = new Date(+(jQuery.datepicker.formatDate("@", datepicker_el.datepicker("getDate"))));
526 }
527
528 d = d.getUTCFullYear() + '-' +
529 wdk_pad(d.getMonth() + 1) + '-' +
530 wdk_pad(d.getDate()) + ' ' +
531 wdk_pad(d.getHours()) + ':' +
532 wdk_pad(d.getMinutes()) + ':' +
533 wdk_pad(d.getSeconds());
534 return d;
535 };
536 }
537
538 if (typeof wdk_date_notime_sql_normalize != 'function') {
539 var wdk_date_notime_sql_normalize = (date = '', datepicker_el = null) => {
540 if(date == '') {
541 var d = new Date();
542 } else {
543 var d = new Date(date);
544 }
545
546 if(d == 'Invalid Date' && datepicker_el) {
547 var d = new Date(+(jQuery.datepicker.formatDate("@", datepicker_el.datepicker("getDate"))));
548 }
549
550 d = d.getUTCFullYear() + '-' +
551 wdk_pad(d.getMonth() + 1) + '-' +
552 wdk_pad(d.getDate());
553 return d;
554 };
555 }
556
557 if (typeof wdk_generate_marker_ajax_popup != 'function') {
558 var wdk_generate_marker_ajax_popup = (ajax_url, listing_post_id, lat, lng,innerMarker, wdk_jpopup_customOptions, auto = false, clusters_enabled = true) => {
559
560 if(auto) {
561 var marker = L.marker(
562 [lat, lng],
563 {icon: L.divIcon({
564 html: innerMarker,
565 className: 'open_steet_map_marker',
566 iconSize: 'auto',
567 })
568 }
569 );
570 } else {
571 var marker = L.marker(
572 [lat, lng],
573 {icon: L.divIcon({
574 html: innerMarker,
575 className: 'open_steet_map_marker',
576 iconSize: [40, 60],
577 popupAnchor: [-1, -35],
578 iconAnchor: [23, 73],
579 })
580 }
581 );
582 }
583
584 var data = {
585 "action": 'wdk_public_action',
586 "page": 'wdk_frontendajax',
587 "function": 'map_infowindow',
588 "listing_post_id": listing_post_id
589 };
590
591 let favorite_init = false;
592 let compare_init = false;
593 marker.bindPopup(function () {
594 var content = '<div class="infobox"><div class="map_infowindow"><div class="loading_content animated-background"><div class="box_line m170"></div><div class="box_line m20"></div><div class="box_line m20"></div><div class="box_line m20"></div><div class="box_line m20"></div><div class="box_line m20"></div></div></div></div>';
595 marker.getPopup().setContent(content);
596 marker.getPopup().update();
597 jQuery.ajax({
598 url : ajax_url,
599 type : "POST",
600 data: data,
601 success: function (data) {
602 marker.getPopup().setContent(data.popup_content);
603 marker.getPopup().update();
604 if (!favorite_init && typeof wdk_favorite == 'function')
605 wdk_favorite('.infobox');
606
607 favorite_init = false;
608
609 if (!compare_init && typeof wdk_init_compare_elem == 'function')
610 wdk_init_compare_elem();
611
612 compare_init = false;
613 },
614 });
615 return content;
616 }, wdk_jpopup_customOptions);
617
618 if (typeof wdk_favorite == 'function')
619 marker.on('popupopen', function (popup) {
620 if (!favorite_init)
621 wdk_favorite('.infobox');
622 });
623
624 if (typeof wdk_init_compare_elem == 'function')
625 marker.on('popupopen', function (popup) {
626 if (!compare_init)
627 wdk_init_compare_elem();
628 });
629
630 if (typeof wdk_favorite == 'function')
631 marker.on('popupclose', function (popup) {
632 marker.getPopup().setContent(jQuery('.leaflet-popup-content-wrapper .leaflet-popup-content').html());
633 marker.getPopup().update();
634 });
635
636 if(clusters_enabled) {
637 wdk_clusters.addLayer(marker);
638 } else {
639 wdk_map.addLayer(marker);
640 }
641 return marker;
642 }
643 }
644
645 if (typeof wdk_generate_marker_basic_popup != 'function') {
646 var wdk_generate_marker_basic_popup = (lat, lng, innerMarker, wdk_jpopup_content, wdk_jpopup_customOptions) => {
647 var marker = L.marker(
648 [lat, lng],
649 {icon: L.divIcon({
650 html: innerMarker,
651 className: 'open_steet_map_marker',
652 iconSize: [40, 60],
653 popupAnchor: [-1, -35],
654 iconAnchor: [23, 73],
655 })
656 }
657 );
658
659 marker.bindPopup(wdk_jpopup_content, wdk_jpopup_customOptions);
660
661 return marker;
662 }
663 }
664
665 if (typeof wdk_generate_marker_nopopup != 'function') {
666 var wdk_generate_marker_nopopup = (lat, lng,innerMarker) => {
667 var marker = L.marker(
668 [lat, lng],
669 {icon: L.divIcon({
670 html: innerMarker,
671 className: 'open_steet_map_marker',
672 iconSize: [40, 60],
673 popupAnchor: [-1, -35],
674 iconAnchor: [23, 73],
675 })
676 }
677 );
678
679 return marker;
680 }
681 }
682