Pop up image in GeoJSON file

by Mariusz Krukar   Last Updated August 13, 2019 18:22 PM

I am trying to put an image inside the geoJSON file.

I know, that Geojson works as string and I cannot input the image directly, however I found some stuff, like this below:


which could be working, when code would be written properly. I believe, that problem lies somewhere in the quotes.


Anyhow my code looks like:

"type": "Feature",
             "properties": {
             "Title": "Stretham house",
                 "Head": "Flat to leave",
                 "Description": "<a href='https://en.wikipedia.org/wiki/Cambridge#/media/File:KingsCollegeChapelWest.jpg'<a>File directory</a>"
            "geometry": {
            "type": "Point",
            "coordinates": [

And then...

var openreach = L.geoJSON(openpoor, {
pointToLayer: function (feature, latlng) {
feature.properties.myKey = feature.properties.Title + ', ' + feature.properties.Head
    return L.circleMarker(latlng, btMarkerOptions);
    onEachFeature: function (feature, layer) {
        layer.bindPopup('<h1><u><font color="red">'+feature.properties.Title+'</h1></u></font><h2>Address: '+feature.properties.Head+'</h2><p>'+feature.properties.Description+'</p><a>'+feature.properties.URL+'</a><br><img src='+ feature.properties.Pict +'/>');


As you can see I tried to put an image by 2 ways. Link opens me the image URL, however it's not visible at the pop up.

Another option fell through due some code mismatch.

I would like to have an effect similar to Google MyMaps

I am aware, that GeoJSON duesn't support a way such this, although any other ideas will be appreciated.

Image popup in Google MyMaps

Related Questions

Updated August 14, 2019 15:22 PM

Updated February 19, 2018 08:22 AM

Updated February 20, 2017 13:22 PM

Updated April 03, 2019 15:22 PM

Updated November 08, 2017 15:22 PM