9
Hava durumu simgesinin wunderground's api, Leaflet ve Cloudmade kullanarak harita işaretleyicisinde gösterilmesini sağlamaya çalışıyorum. Metin gösterimi ve simge görüntüsüyle bir değişkenim var, ancak nasıl gösterileceğinden emin değilim. İşte benim kod:Resimde göster Yaprakçık Popup
jQuery(document).ready(function($) {
$.ajax({
url: "http://api.wunderground.com/api/cd48ac26fb540679/conditions/q/pws:KCASANFR128.json",
dataType: "jsonp",
success: function(parsed_json) {
var location = parsed_json['current_observation']['observation_location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
var icon = parsed_json['current_observation']['icon_url'];
marker1.bindPopup("Current temperature in " +location+ " is: " + temp_f).openPopup();
}
});
});
hiçbir başarı ile bu çalıştı:
marker1.bindPopup(<img src=icon> "Current temperature in " +location+ " is: " + temp_f).openPopup();
herhangi bir öneriniz? siz de tırnak etiketlerinizi çevrelemeniz gerekir böylece