Rivenditori Novastor

"); /* setting up the map */ var params = { "instance_id":"locate_anything_map_13877", "map-id": "13877", "map-container":'map-container-13877', "initial-lat": 41.82046, "initial-lon": 13.24951, "initial-zoom": 6, "autogeocode" :'0', "display_only_inbound" : '0', "overlay" : {url:"ROADMAP",attribution:"GoogleMaps" ,maxZoom:18 ,minZoom:5}, "googleplaces" : 0, "max_nav_item_per_page" : 10, "style-hue":"#000000", "scrollWheelZoom" : 1, "navlist_event" : 'click', "hide-splashscreen" : '0', "kml_file" : '', "kml_fillColor" : '#cbbdfb', "kml_weight" : '2', "kml_opacity" : '1', "kml_color" : '#000000', "kml_dashArray" : '2', "kml_fillOpacity" : '0.5' }; /* define instance name*/ var map_instance="locate_anything_map_"+map_id; /* instanciate filter class */ eval("var "+map_instance+"=new leaflet_filters_class(params);"); /* loading ... */ eval(map_instance).showLoader(true); /* Initialize Map */ eval(map_instance).createMap(); /* Register filters, property_name is the name of the property as shown in the JSON datas */ var custom_filters= [{"property_name":"","html_id" : "#-13877"},{"property_name":"locateanythingmarkercategory","html_id" : "#locateanythingmarkercategory-13877"},{"property_name":"locateanythingmarkertag","html_id" : "#locateanythingmarkertag-13877"},]; eval(map_instance).register_filters(custom_filters); /* Override nav item template */ eval(map_instance).template_nav_item = function(marker,LatLng) { var template=''; return template; }; /* define callback function */ var createEverything_13877 = function(result){ var cpt=0; for(var i in result["data"]){ var marker={}; /* The JSON containing the markers data is indexed to save space and generation time * Rebuilds the object with original field names */ var indexed_marker=result["data"][i]; for(var k in indexed_marker) { marker[result["index"]["fieldnames"][k]]=indexed_marker[k]; } /* Marker creation : set timeout is used to allow the progressbar to update */ setTimeout(function(marker){ /* define Tooltip HTML*/ var default_tooltip_template='

'+decode((marker.title?marker.title:''))+'

Indirizzo: '+decode((marker.street?marker.street:''))+', '+decode((marker.streetnum?marker.streetnum:''))+'
'+decode((marker.zip?marker.zip:''))+' - '+decode((marker.city?marker.city:''))+', '+decode((marker.state?marker.state:''))+'
Orari: '+(marker["locate-anything-additional-field-1473855253316"]?decode(marker["locate-anything-additional-field-1473855253316"]):'')+'
Telefono: '+(marker["locate-anything-additional-field-1473855282024"]?decode(marker["locate-anything-additional-field-1473855282024"]):'')+'
Fax: '+(marker["locate-anything-additional-field-1473855300659"]?decode(marker["locate-anything-additional-field-1473855300659"]):'')+'
'+decode((marker.content_stripped?marker.content_stripped:''))+'
'+decode((marker.small_thumbnail?marker.small_thumbnail:''))+''; // length must be superior to 2 because of the inclusion of 2 single quotes to delimitate the output if(marker.tooltip_template.length>2) { var html = eval(marker.tooltip_template); } else var html=default_tooltip_template; /* define icon*/ var customIcon=null; if(marker.custom_marker){ customIcon= eval(map_instance).getMarkerIcon(marker.custom_marker); } else customIcon=false; /* No custom icon, use default icon for this map */ if(!customIcon) customIcon= eval(map_instance).getMarkerIcon(result["defaults"][0].default_marker); /* updates progress bar */ eval(map_instance).updateProgressBar(cpt++, result["data"].length, 1000); /* creates the marker */ eval(map_instance).createMarker(marker.lat,marker.lng,html,marker,customIcon); },1,marker); } setTimeout(function(){ /* Render Map */ eval(map_instance).render_map(eval(map_instance).markers); /* Creation Nav */ eval(map_instance).updateNav(0); /* hide loader */ eval(map_instance).showLoader(false); /* stores the map in Jquery for easier access*/ current_map=eval(map_instance) ; },250); } /* JSON : Retrieve markers data */ eval(map_instance).getData("http://www.biatwork.com/wp-admin/admin-ajax.php?action=getMarkers&map_id=13877",createEverything_13877) /* call Tokenize for nice selects */ if(jQuery.tokenize){ var token1=jQuery('#map-filters-'+map_id+' .tokenize-1').tokenize({maxElements:"1",onRemoveToken:function(e,f){eval(map_instance).update_markers();},onAddToken:function(e,f){eval(map_instance).update_markers();}}); var token=jQuery('#map-filters-'+map_id+' .tokenize').tokenize({maxElements:"9999",onRemoveToken:function(e,f){eval(map_instance).update_markers();},onAddToken:function(e,f){eval(map_instance).update_markers();}}); } /* Hide attribution */ jQuery('.leaflet-control-attribution').hide(); });
  • avast
    bi4data
    novastor