Skip links

Progetti di Rigenerazione

"); --> /* setting up the map */ var params = { "instance_id":"locate_anything_map_4475", "map-id": "4475", "map-container":'map-container-4475', "initial-lat": 45.213004, "initial-lon": 12.480469, "initial-zoom": 5, "single-zoom": 5, "autogeocode" :'0', "display_only_inbound" : '1', "overlay" : {url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"OpenStreetMap" ,maxZoom:18 ,minZoom:2}, "googleplaces" : 0, "max_nav_item_per_page" : 10, "style-hue":"#000000", "scrollWheelZoom" : 0, "navlist_event" : 'click', "popup_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', "bing-key" : 'An5y6EfmR_Tmk0nMXSWFQD7JZ2sc5Zv793InR2eKkVmMpwxfa_XOzlEmIEPXIol9', "load-google" : '', "load-bing" : '', "load-yandex" : '', "overlay-addon" : '', "overlay-addon-accessToken-jawg" : '', "overlay-addon-customstyle-jawg" : '', "overlay-addon-accessToken-thunderforest" : '', "overlay-addon-accessToken-mapbox" : '', "overlay-addon-accessToken-maptiler" : '', "overlay-addon-accessToken-openweathermap" : '', "overlay-addon-accessToken-here" : '', "enable_fitBounds" : '0', "enable_zoom_to_marker" : '0' }; /* 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" : ".-4475"},{"property_name":"locateanythingmarkercategory","html_id" : ".locateanythingmarkercategory-4475"},{"property_name":"locateanythingmarkertag","html_id" : ".locateanythingmarkertag-4475"},]; 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_4475 = 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.small_thumbnail?marker.small_thumbnail:''))+'
'+decode((marker.content_stripped?marker.content_stripped:''))+'
read more'; // 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); eval(map_instance).setup_range_sliders(); },250); } /* JSON : Retrieve markers data */ eval(map_instance).getData("https://www.ricicloinitalia.it/wp-admin/admin-ajax.php?action=getMarkers&map_id=4475",createEverything_4475) /* 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(); jQuery('.filter-select select').chosen({width:'250px',allow_single_deselect:'true'}); }); //console.log("jQuery is loaded."); })();

Project zoeken:

GEZOCHTE PROJECTEN