fulcrumapp / geojson-dashboard

A configurable framework for building a geographic "data dashboard" from a GeoJSON file.
http://fulcrumapp.github.io/geojson-dashboard/
MIT License
222 stars 90 forks source link

Images Hyperlink related to GeoJSON features #14

Open abrobia opened 6 years ago

abrobia commented 6 years ago

Hello, I am migrating a web map project from bootleaf template to geojson-dashboard framework.

In bootleaf template, I included the images Hyperlink into the table, popup window, like in the following example:

onEachFeature: function (feature, layer) {
    if (feature.properties) {
      var content = "<table class='table table-striped table-bordered table-condensed'>" + 
      "<tr><th>Line Name</th><td>" + feature.properties.LineName + "</td></tr>" +
      "<tr><th>Image</th><td>**<a target='_blank' href='./assets/img/Seismic_lines/"+feature.properties.LineName+".jpg'>" + "View" + "</a>**</td></tr>" + "<table>";

As you can see, the Hyperlink is a file path to a directory of my PC (into Apache web server folders).

My issue: how to do that by using geojson-dashboard framework ? Or in other items: where in the code I must to include the Hyperlink to display images related to each geojson feature in the App.js document?

I will appreciate some help. Thank you very much.

abrobia commented 6 years ago

Hello, hoping there is some kind soul that could replay...i'll try to ask diversely: It is possible to add the images URL or Hyperlink dynamically? or is it strictly necessary to edit the geojson file and create a column for the URLs? My goal could be adding a reference to my images directory somewhere into the app.js like this : <a target='_blank' href='./assets/img/Seismic_lines/"+feature.properties.LineName+".jpg'></a> Is that possible? If yes, how to do? THANKS