PageSourceSearch

https://www.concentrix.com/wp-content/cache/min/1/wp-content/plugi…/js/maps/eventon_gen_maps.js?ver=1790256048

js concentrix.com collected 2026-09-24 17:08:58 UTC 6,936 bytes, 15 lines download raw bytes

1(function($){$.fn.evoGenmaps=function(opt){var defaults={delay:0,fnt:5,cal:'',SC:'',map_canvas_id:'',location_type:'',address:'',styles:'',zoomlevel:'',mapformat:'',scroll:!1,iconURL:'',trigger_point:'',};var options=$.extend({},defaults,opt);var geocoder;var code={};obj=this;code.obj=this;mapBox=$('#'+options.map_canvas_id);code={init:function(){if(!mapBox.is(':visible')||mapBox.find('.gm-style').length>0)return;mapBox.html(evo_general_params.html.preload_gmap);options.cal=obj.closest('.ajde_evcal_calendar').length?obj.closest('.ajde_evcal_calendar'):options.cal;code.process_SC();if(options.fnt==5){if(options.delay==0){code.draw_map()}else{setTimeout(code.draw_map,options.delay,this)}}
2if(options.fnt==1){code.load_gmap()}
3if(options.fnt==2){if(options.delay==0){code.load_gmap()}else{setTimeout(code.load_gmap,options.delay,this)}}
4if(options.fnt==3){code.load_gmap()}
5if(options.fnt==4){if(this.attr('data-gmtrig')=='1'&&this.attr('data-gmap_status')!='null'){code.load_gmap()}}},process_unique_map_id:function(){var map_element=obj.closest('.eventon_list_event').find('.evo_metarow_gmap');if(!map_element.length||!map_element.attr('id'))return!1;var map_element=obj.closest('.eventon_list_event').find('.evo_metarow_gmap');var randomnumber=Math.floor(Math.random()*(99-10+1))+10;options.map_canvas_id=map_element.attr('id')+'_'+randomnumber;map_element.attr('id',options.map_canvas_id);return options.map_canvas_id},process_SC:function(){if(options.SC||!options.cal)return;options.SC=options.cal.evo_shortcode_data()},load_gmap:function(){var SC=options.SC,ev_location=obj.find('.event_location_attrs'),location_type=ev_location.attr('data-location_type');options.address=location_type=='address'?ev_location.attr('data-location_address'):ev_location.attr('data-latlng');options.location_type=location_type=='address'?'add':'latlng';options.iconURL=SC&&SC.mapiconurl?SC.mapiconurl:options.iconURL;if(!options.address){console.log('Location address missing in options.address');return!1}
6var map_canvas_id=code.process_unique_map_id();if(!map_canvas_id||!$('#'+map_canvas_id).length){console.log('Map element with id missing in page');return!1}
7options.zoomlevel=SC&&SC.mapzoom?parseInt(SC.mapzoom):12;options.scroll=SC.mapscroll;options.mapformat=SC.mapformat;code.draw_map()},draw_map:function(){if(!options.map_canvas_id||$('body').find('#'+options.map_canvas_id).length==0){console.log('Map element with id missing in page');return!1}
8if(typeof gmapstyles!=='undefined'&&gmapstyles!='default'){options.styles=JSON.parse(gmapstyles)}
9var myOptions={mapTypeId:options.mapformat,zoom:options.zoomlevel,scrollwheel:options.scroll!='false',zoomControl:!0,draggable:options.scroll!='false',mapId:'DEMO_MAP_ID'};var map_canvas=document.getElementById(options.map_canvas_id),map=new google.maps.Map(map_canvas,myOptions),geocoder=new google.maps.Geocoder();var directionsService=new google.maps.DirectionsService();var directionsRenderer=new google.maps.DirectionsRenderer({map:map,panel:document.getElementById('directions-panel-'+options.map_canvas_id)});$('#get-directions-'+options.map_canvas_id).on('click',function(){var userAddress=$('#user-address-'+options.map_canvas_id).val();if(!userAddress.trim()){alert('Please enter a starting address');return}
10geocoder.geocode({'address':userAddress},function(userResults,userStatus){if(userStatus!==google.maps.GeocoderStatus.OK){alert('Invalid starting address');return}
11var eventLocation;if(options.location_type==='latlng'&&options.address){var latlngStr=options.address.split(',');eventLocation=new google.maps.LatLng(parseFloat(latlngStr[0]),parseFloat(latlngStr[1]))}else{geocoder.geocode({'address':options.address},function(eventResults,eventStatus){if(eventStatus===google.maps.GeocoderStatus.OK){eventLocation=eventResults[0].geometry.location;code.renderDirections(directionsService,directionsRenderer,userResults[0].geometry.location,eventLocation)}});return}
12code.renderDirections(directionsService,directionsRenderer,userResults[0].geometry.location,eventLocation)})});code.renderDirections=function(directionsService,directionsRenderer,origin,destination){var request={origin:origin,destination:destination,travelMode:google.maps.TravelMode.DRIVING};directionsService.route(request,function(result,status){if(status===google.maps.DirectionsStatus.OK){directionsRenderer.setDirections(result)}else{alert('Directions could not be calculated: '+status)}})};if(options.location_type=='latlng'&&options.address!==undefined){var latlngStr=options.address.split(",",2);var lat=parseFloat(latlngStr[0]);var lng=parseFloat(latlngStr[1]);var latlng=new google.maps.LatLng(lat,lng);geocoder.geocode({'latLng':latlng},function(results,status){if(status==google.maps.GeocoderStatus.OK){let markerOptions={map:map,position:latlng};if(options.iconURL&&options.iconURL.trim()!==''){var img=new Image();img.src=options.iconURL;img.onload=function(){var imgWidth=img.width;var imgHeight=img.height;var customIcon=document.createElement('div');customIcon.className='custom-marker';customIcon.style.width=imgWidth+'px';customIcon.style.height=imgHeight+'px';customIcon.style.backgroundImage=`url(${options.iconURL})`;customIcon.style.backgroundSize='cover';customIcon.style.position='absolute';markerOptions.content=customIcon;const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);map.setCenter(marker.position)};img.onerror=function(){console.error("Error loading marker image: "+options.iconURL);const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);map.setCenter(marker.position)}}else{const marker=new google.maps.marker.AdvancedMarkerElement(markerOptions);map.setCenter(marker.position)}}else{map_canvas.style.display='none'}})}else if(options.address==''){}else{geocoder.geocode({'address':options.address},function(results,status){if(status==google.maps.GeocoderStatus.OK){map.setCenter(results[0].geometry.location);new google.maps.Marker({map:map,position:results[0].geometry.location,icon:options.iconURL})}else{map_canvas.style.display='none'}})}
13$('#'+options.map_canvas_id).addClass('mDrawn')}}
14code.init()};$.fn.evo_load_gmap=function(opt){var defs={map_canvas_id:'',delay:0,trigger_point:''},OO=$.extend({},defs,opt),EL=this,EL_id=OO.map_canvas_id||EL.attr('id'),location_type=EL.data('location_type')=='add'?'add':'latlng',address=location_type=='add'?EL.data('address'):EL.data('latlng'),scrollwheel=EL.data('scroll')=='yes',elms=document.querySelectorAll("[id='"+EL_id+"']");if(elms.length>1){var randomnumber=Math.floor(Math.random()*(99-10+1))+10;EL_id=EL_id+'_'+randomnumber;EL.attr('id',EL_id)}
15var __delay=OO.delay||EL.data('delay')||0;let mapData={map_canvas_id:EL_id,cal:OO.cal,fnt:5,location_type:location_type,address:address,zoomlevel:parseInt(EL.data('zoom')),mapformat:EL.data('mty'),scroll:scrollwheel,iconURL:EL.data('mapicon')||'',delay:__delay,trigger_point:OO.trigger_point};EL.evoGenmaps(mapData)}}(jQuery))

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.