Copy link to clipboard
Copied
I'm trying to use this code in a web app item list template:
var obj_{tag_counter} = {
name:'{tag_name_nolink}',
num:'{tag_counter}',
type:'{tag_type}',
desc:'{tag_description}'
}
Unfortunately the appears to be a line break which isn't in the individual web app item's description, but is always added to the end of the string when {tag_description} is used. This results in the following error:
Any idea what I'm doing wrong?
Tag description will have a variety of html entities, images and more, To much for the description value so a custom field with short description will do.
You are doing inline script as well as you got the tags there, Your better off with rendered data or fetched data from the web apps and if your using html 5 data-address etc is better and have your scripts in script files.
Copy link to clipboard
Copied
May I ask what are you trying to achieve?
Copy link to clipboard
Copied
Use Google Map's Javascript API to build markers and info windows on a map
(yes I am aware that web apps have this functionality somewhat baked into them already, but the address geocoding that it uses is complete garbage)
page content & web app item list
I was hoping to avoid having to create a generic multiline text field to duplicate how {tag_description} should behave. The other idea I had was bringing web app items in as hidden DOM elements and driving everything else off of those, but I really am not a huge fan of creating unnesscary markup.
Copy link to clipboard
Copied
Tag description will have a variety of html entities, images and more, To much for the description value so a custom field with short description will do.
You are doing inline script as well as you got the tags there, Your better off with rendered data or fetched data from the web apps and if your using html 5 data-address etc is better and have your scripts in script files.
Copy link to clipboard
Copied
Ended up rendering out hidden div's with data attributes, which were looped through to create the elements that appear on the map. The various filters are applied by looking for the relevant data attribute values, toggling the visible data attribute for those particular items, and then reinitializing the map.