Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for parsing URLs in overlay modal? #78

Open
mbriney opened this issue Apr 22, 2019 · 3 comments
Open

Support for parsing URLs in overlay modal? #78

mbriney opened this issue Apr 22, 2019 · 3 comments

Comments

@mbriney
Copy link

mbriney commented Apr 22, 2019

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
Copy link
Contributor

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:

if (popupInfo.fieldInfos[i].visible === true) {
content += '<div style="font-weight:bold;color:#999;margin-top:5px;word-break:break-all;">' + popupInfo.fieldInfos[i].label + '</div><p style="margin-top:0;margin-bottom:5px;word-break:break-all;">' + properties[popupInfo.fieldInfos[i].fieldName] + '</p>';
}

@mbriney
Copy link
Author

mbriney commented Apr 22, 2019

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

@jgravois
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants