Mostrar imagen en el menú emergente del folleto
Estoy tratando de obtener el ícono del tiempo para mostrarlo en un marcador de mapa usando la API de wunderground, Leaflet y Cloudmade. Tengo el texto que se muestra y una variable con el icono de imagen, pero no estoy seguro de cómo mostrarlo. Aquí está mi código:
<code>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(); } }); }); </code>
Intenté esto sin éxito
<code>marker1.bindPopup( <img src=icon> "Current temperature in " +location+ " is: " + temp_f).openPopup(); </code>
¿Alguna sugerencia?