Instead of storing html in JavaScript popuptemplate variable (see below), is there a way to save popup template as an html file and pass a JavaScript object to the html?
Currently following code is working for me. Just trying to find a cleaner way.
var popupTemplate = (o) =>
`<div>${o.variable_name}</div>`
Any other ideas are welcome too.
Thanks in advance for your help!
Solved! Go to Solution.
I think that's a good way to do it. This sample uses L.Util.template which is a slightly different way to do it, so that's an alternative for you too.
I think that's a good way to do it. This sample uses L.Util.template which is a slightly different way to do it, so that's an alternative for you too.