| " + litres + " L | "; } else { txt += "" + litres + " L | "; } txt += "per il " + json[i].prezzi[j].descCarburante + " | "; txt += ""; if(json[i].prezzi[j].isSelf === "1") { txt += "(self)"; } else { txt += ""; } txt += " | "; txt += ""; } txt += "
+ PREFERITI"; txt += "segnala errore
"; L.marker([json[i].latitudine, json[i].longitudine], { bounceOnAdd: true, bounceOnAddOptions: {duration: 500, height: 100}, bounceOnAddCallback: function() {} }).bindPopup(txt).addTo(map).options.idImpianto = json[i].idImpianto; } postCallback && postCallback(bounds, json); }); } function suggest_nominatim_addresses(query) { $.ajax({ url: "https://nominatim.openstreetmap.org/search", jsonp: "nominatimJsonp", dataType: "jsonp", data: { q: query, format: "json", json_callback: "nominatimJsonp" } }); } function nominatimJsonp(json) { var $searchResults = $("#modal-search-addr-results"); var $list = $searchResults.find("ol").empty(); if(json.length > 0) { for(i=0; i