[Fixed]-I can't get my leaflet popup to show the data I want

1👍

In your Attempt #1 in map/map.html try replacing this line:

layer.bindPopup(feature.properties.name);

with this:

layer.bindPopup('<img src="'+feature.properties.photo+'" /><p>'+feature.properties.name+'</p>');

You essentially need to build the HTML for the popup in the JavaScript, not in Python.

Leave a comment