vnoelifant / charity-finder

3 stars 0 forks source link

Project link doesn't work when clicking in folium map. #46

Closed vnoelifant closed 1 year ago

vnoelifant commented 1 year ago

Only able to view "Project Details" in the folium map when viewing link in a new tab.

vnoelifant commented 1 year ago

When hovering over a heatmap area, in the popup, View Project Details link does not open from popup.

Image

vnoelifant commented 1 year ago

Here are resources I have found and read about. I basically passed in an html string to an iframe objects which then gets passed in to Folium's popup, which I thought would work, but others recommend some type of javascript code since folium may not be able to handle events within the popup itself.

https://stackoverflow.com/questions/74707544/add-a-clickevent-function-to-multiple-folium-markers-with-python

https://github.com/python-visualization/folium/issues/13

https://gis.stackexchange.com/questions/385565/inserting-an-url-link-in-markers-popup-in-folium

https://stackoverflow.com/questions/29535715/python-with-folium-how-can-i-embed-a-webpage-in-the-popup

https://gis.stackexchange.com/questions/385565/inserting-an-url-link-in-markers-popup-in-folium

https://www.515tech.com/post/mapping-global-terrorism-with-folium-and-publicly-available-data

bbelderbos commented 1 year ago

Seems adding target=_blank to the link (a tag) works here :) Please confirm on your end ... (hope you won't hit an ad popup blocker in your browser / windows ...)