I have added a geojson file on my map. By clicking on a geojson feature I am getting a pop up which is displaying geometry and coordinate values. Now I want to display image in a pop up also.
How to add it?
This is the geojson code:
{
'type': 'FeatureCollection',
'crs': {
'type': 'name',
'properties': {
'name': 'EPSG:4326'
}
},
'features': [{
'type': 'Featurejson',
'geometry': {
'type': 'Point',
'coordinates': [92.460416718365195, 10.845240354970281],
//'imgurl': 'http://www.w3schools.com/html/default.asp'
//'name':"file:///C:/Documents%20and%20Settings/sonal/Desktop/html/point.PNG"
},
"properties": {
//"image": "http://www.w3schools.com/html/default.asp",
//"href": "http://www.w3schools.com/html/html5.gif",
"name": "file:///C:/Documents%20and%20Settings/sonal/Desktop/html/point.PNG",
//"1":"point.png",
"description": "43.732, -83.9387"
}
},
Best Answer
For instance how about using the ol3-popup plugin? Here you can define the html content of your popup.