ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Creating a GeoRSS template using custom fields?

April 25, 2008 3:17pm

Subscribe [2]
  • #1 / Apr 25, 2008 3:17pm

    mattbaily

    3 posts

    I have been trying to create a GeoRSS template that pulls in custom fields from a weblog. I have been testing it on google maps site and so far I have been having not much luck. It throws multiple syntax error warnings.

    I know the general xml code is good because I entered some static info between the xml tags and it displayed properly. I just can’t seem to get the dymanic content in there.

    Any ideas?

    Thanks,
    Matt

    Current code in my rss template:

    <?xml version="1.0"?>
    <rss version="2.0" xmlns:georss="http://www.georss.org/georss">
    <channel>
    {exp:rss:feed weblog="maps_test"}
    <item>
     <title>{title}</title>
     <link>{url_title}</link>
     <description>{caption}</description>
     <georss:point>{maps_longitude_field}{maps_latitude_field}</georss:point>
    </item>
    </channel> 
    {/exp:rss:feed}
    </rss>
  • #2 / Apr 25, 2008 6:00pm

    mattbaily

    3 posts

    Well, I kind of figured it out and this seems to work (although my markers are slightly off on google’s map):

    {exp:rss:feed weblog="maps_test" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
    <?xml version="1.0"?>
    <rss version="2.0" xmlns:georss="http://www.georss.org/georss">
    <channel>
    {exp:weblog:entries weblog="maps_test" limit="10" rdf="off" dynamic_start="on" disable="member_data|trackbacks"}
    <item>
     <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
     <link>http://www.test.com</link>
     <description>Test</description>
     <georss:point>{exp:xml_encode} {maps_longitude_field} {maps_latitude_field} {/exp:xml_encode}</georss:point>
    </item>
    {/exp:weblog:entries}
    </channel> 
    </rss>
    {/exp:rss:feed}

    I am now trying to hook it into the Coollocation tags in the template so it displays on my map.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases