1 2jQuery( document ).ready(function($) { 3 4 jQuery.fn.applyAdvanceUrlFilters = function ( options ) { 5 6 let settings = $.extend( { mapWidth: "50", startChanges : true }, options ); 7 8 let map_obj = jQuery(settings.wpgmp_map_selector).data("wpgmp_maps"); 9 10 const mapId = map_obj.map_data.map_property.map_id; 11 12 let styles = [ 13 { 14 "featureType": "all", 15 "elementType": "geometry.fill", 16 "stylers": [ 17 { 18 "color": "" 19 } 20 ] 21 }, 22 { 23 "featureType": "water", 24 "elementType": "geometry.fill", 25 "stylers": [ 26 { 27 "color": "#AADAFF" 28 } 29 ] 30 } 31 ]; 32 33 34 let wpgmp_get_current_styles = function(){ 35 36 if(map_obj.map_data.skinInfo.custom_color == 'true'){ 37 38 styles[0]['stylers'][0]['color'] = map_obj.map_data.skinInfo.color; 39 } 40 else{ 41 42 let schema_color = map_obj.map_data.skinInfo.swatch_color; 43 schema_color = schema_color.split("_"); 44 styles[0]['stylers'][0]['color'] = schema_color[0]; 45 } 46 47 return styles; 48 49 } 50 51 52 if( map_obj.map_data.skinInfo !== undefined) { 53 54 let condition_one = (map_obj !== 'undefined' && map_obj.map_data.skinInfo.enable_clr_for_skin != 'undefined' && map_obj.map_data.skinInfo.enable_clr_for_skin == 'true') ? true : false; 55 56 let condition_two = false; 57 58 let condition_three = (map_obj !== 'undefined' && map_obj.map_data.skinInfo.choose_clr_for_skin != 'undefined' && map_obj.map_data.skinInfo.choose_clr_for_skin == 'true') ? true : false; 59 60 if(condition_one || condition_three){ 61 let condition_two = (map_obj !== 'undefined' && map_obj.map_data.skinInfo.is_admin) ? true : false; 62 } 63 64 if (condition_one || condition_two || condition_three) { 65 66 let styles = wpgmp_get_current_styles(); 67 map_obj.map.setOptions({styles: styles}); 68 69 } 70 71 72 } 73 74 75 if($('.skin_color_updater').length > 0) { 76 $('.skin_color_updater').wpColorPicker({ 77 change: function(event, ui) { 78 79 styles[0]['stylers'][0]['color'] = $(this).val(); 80 map_obj.map.setOptions({styles: styles}); 81 82 } 83 }); 84 } 85 86 if($('input[type=radio][name=map_skin_schema]').length > 0) { 87 88 jQuery('input[type=radio][name=map_skin_schema]').change(function() { 89 90 let res = this.value.split('_'); 91 styles[0]['stylers'][0]['color'] = res[0]; 92 map_obj.map.setOptions({styles: styles}); 93 94 }); 95 96 } 97 98 return this; 99 }; 100 101 102 if($("#map_id").length > 0) { 103 $("#map_id").change(function() { 104 $(this).closest('form').submit(); 105 }); 106 } 107 108 jQuery("div.wpgmp_map_container").each(function (index, element) { 109 110 let wpgmp_map_selector = "#"+$(this).attr('rel'); 111 let wpgmp_layout_args = {'wpgmp_map_selector' : wpgmp_map_selector}; 112 jQuery(wpgmp_map_selector).applyAdvanceUrlFilters(wpgmp_layout_args); 113 114 }); 115 116});
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.