Hi,

what are you trying to achieve? Style.createLiteral is not a part of the API. 
Looks like what you want to do can be achieved with

content = OpenLayers.String.format(feature.style.balloonStyle, 
feature.attributes);

And instead of e.g. ${western_southland_sections/SectionNam}, you need 
${sectionNam} in your template.

Also, your balloonStyle is probably not stored best as a symbolizer property.

Regards,
Andreas.

On Oct 8, 2010, at 03:11 , Phil Scadden wrote:

>  I am creating a popup from kml and call
> 
>                     content = 
> OpenLayers.Style.createLiteral(feature.style.balloonStyle, feature);
> 
>                 if (feature.style.balloonStyle)  {
>                      // Use Style.js to replace balloonstyle variables 
> with attribute values
>                     content = 
> OpenLayers.Style.createLiteral(feature.style.balloonStyle, feature);
> 
> My balloonStyle is:
> <a href="data/WSSections/${western_southland_sections/SectionRef} 
> ${western_southland_sections/SectionNam}.pdf">${western_southland_sections/SectionNam}</a>
> 
> and features has attributes of SectionRef,SectionNam, and MapSheet. But 
> createLiteral is doing nothing. In firebug, I set breakpoints in the 
> replacer function String.format but cant seem to step in or ever reach 
> there to find out what is going on. Where am I going wrong here?
> 
> 
> 
> 
> Notice: This email and any attachments are confidential. If received in error 
> please destroy and immediately notify us. Do not copy or disclose the 
> contents.
> 
> _______________________________________________
> Users mailing list
> us...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to