The Interactive SDK> Customize SHapes>Add Custom shapes example displays the custom icon with the text "Shape" plus it's ID. Here is the source:
var icon = "<div style='font-size:12px;font-weight:bold;borderolid 2px Black;background-color:Aqua;width:50px;'>Shape</div>";
However, I cant find anywhere in the source where the ID number is added to the word "Shape" that is between the DIV tags.
My problem is that I need to use text from another control on the page and place it where the "Shape" word is between the DIV tags, but I cant figure out how . I have tried:
pin3.SetCustomIcon("<div><script>document.write(document.getElementById('User2').value);</script></div>");
and to simplify by removing the reference to the other control:
pin3.SetCustomIcon("<div><script>document.write('testing');</script></div>");
Both of these scripts work fine in a normal <div> tag but neither works when wrapped inside the SetCustomIcon method.
I am hoping that if I can see how the SDK example is adding a variable between the DIV tags, I might figure out a better approach.....uhh...one that works!