ynunokawa / L.esri.WebMap

A leaflet plugin to display ArcGIS Web Map.
MIT License
22 stars 21 forks source link

Support for parsing URLs in overlay modal? #78

Open mbriney opened 5 years ago

mbriney commented 5 years ago

In our info window, the online version of the Esri map viewer supports parsing of hyperlinks as "More Info" links. See an example here: http://arcg.is/58XL8

However in the L.esri.WebMap plugin just shows the URL and it's not clickable. http://ynunokawa.github.io/L.esri.WebMap/index.html?webmap=88b7c0f377b14e8da0e0698f260944d2

It would be great if the plugin could parse and display them as hyperlinks that would open in a new tab/window.

jgravois commented 5 years ago

if you want to roll up your sleeves, you could place some new logic to conditionally add an <a href="">More Info</a> tag instead of a <p> tag here:

https://github.com/ynunokawa/L.esri.WebMap/blob/ca25992aa643ced7ef68445ae97398b69e961bac/src/Popup/Popup.js#L20-L22

mbriney commented 5 years ago

@jgravois just submitted a pull request that should add this functionality.

jgravois commented 5 years ago

very cool.

i don't have push access to this repo (or the bandwidth to take over maintaining another leaflet plugin), but i'm glad to see you were able to implement the enhancement you were asking for on your own.