Updated: February 7, 2012
KML 2.1 Feed for Aloqa
See Example feed below
Feed structure
Basics
A KML 2.1 feed consists of <Placemark> elements with descriptive properties. Each <Placemark> element will become an item in your channel on the client. It needs an id attribute with a unique value that references the item.
id has to be unique not only for a single request, but across all requests. You can achieve this by encoding a location reference (such as latitude/longitude value) into the id.Properties:
<name>will become the title of the item.<description>will be used as the textual description of the item. There is no limit as clients will allow users to scroll the description if it is too long to fit on the screen. However, it is good practice to shorten the description to about 160 characters.<icon>(inside of<Style>and<IconStyle>) points to the image, which will be displayed within the item. (Do not mistake this image for the channel icon.) This image should neither be more than 150 px high nor more than 150 px wide.<coordinates>(inside of<Point>) specifies the location of the item; it will be used for the location-dependent push of the item to the client. The format is“<longitude>,<latitude>,0”.
Please note the unusual order of the components: KML places the longitude value before the latitude value! Furthermore, you have to add an altitude value (0 is fine).
Additional information
<aloqa:rating>is an optional piece of information. It indicates the rating associated with the item. Rating uses the interval from 0 to 10 and will be displayed on the client as zero to five stars. So a rating value of 10 corresponds to 5 stars, while a rating value of 3 corresponds to 1.5 stars.<aloqa:snippet>is another optional piece of information. Here you can specify a one-line description of the item, which will be used in the item list a user sees when entering a channel.<aloqa:fbPlace>is another optional piece of information. Here you can specify a name of the Facebook Place corresponding to the item. If this field has text, the user will be able to check-in at this item on Facebook. (It is also required ifaloqa:eventsis used.) Be careful with the name—if this Facebook Place does not exist, it will be created at Facebook when the first user checks in.<aloqa:events name=“Name of the Event”><aloqa:event start=“1298354400000” end=“1298419200000”/>…</aloqa:events>is another optional piece of information that describes an event that is connected with this Aloqa channel item. It is a list of event start/end timestamps (there may be more than onealoqa:eventelement; each end timestamp is optional). Every entry specifies when such an event starts and, optionally, when it ends. The timestamp is a UTC timestamp in milliseconds. Theeventselement has anameattribute to specify the name of the event, which will be synced to Facebook, if someone attends the event. Requires a valid Facebook Place (<aloqa:fbPlace>) within the same placemark.<aloqa:sortindexes>provides the option to override the default sort order 'by distance'. See Custom Sort Order of Channel Items.
Actions
Within the <aloqa:onView> section, you can specify a set of <aloqa:actions>. These actions will be displayed to the user when they click on the item on the device. The following actions are available:
<aloqa:map/>Map Action: allows to open a map of the users surroundings, which indicates the location of the user and of the result<aloqa:web>Web Action: offers the possibility to access the link specified by<aloqa:url>. It will be opened in the embedded browser on the device. A web action may have the optional attributeid. The web action may be referenced from a recommend action by this identifier. Note: XML requires allids within a feed to be unique. We suggest that you combine this identifier with the item'sidas a prefix or suffix.<aloqa:call>Call Action: offers the option to call the number specified in<aloqa:number>.<aloqa:recommend>Recommend Action: offers the possibility to recommend the item to a friend. Its required attributeidRefhas to contain theidof a web action of the same item (placemark) as the recommend action.
All actions allow you to set a custom label using the <aloqa:customLabel> tag. All actions appear in the same order as they appear in the XML feed.
Example feed
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1" xmlns:aloqa="http://www.aloqa.com/2009/feed">
<Document>
<Placemark id="event_1" >
<name>Pro Kicker Bar</name>
<description><![CDATA[The bar provides three well-tended tables which are very
frequented.]]></description>
<Style>
<IconStyle>
<Icon><href>http://media.example/229/131x182_0,1.jpg</href></Icon>
</IconStyle>
</Style>
<Point>
<coordinates>11.2723,49.8001,0</coordinates>
</Point>
<aloqa:rating>9</aloqa:rating>
<aloqa:snippet>Well-tended tables</aloqa:snippet>
<aloqa:fbPlace>Pro Kicker Bar</aloqa:fbPlace>
<aloqa:events name="Kicker Challenge">
<aloqa:event start="1329664674000" end="1329751101000"/>
</aloqa:events>
<aloqa:onView>
<aloqa:actions>
<aloqa:call>
<aloqa:number>141 321 3211</aloqa:number>
</aloqa:call>
<aloqa:map/>
<aloqa:web id="event_1_web_1">
<aloqa:customLabel>Show website</aloqa:customLabel>
<aloqa:url>http://example/showDetails?id=123345</aloqa:url>
</aloqa:web>
<aloqa:web>
<aloqa:customLabel>Rate loacation</aloqa:customLabel>
<aloqa:url>http://example/rate?id=123345</aloqa:url>
</aloqa:web>
<aloqa:recommend idRef="event_1_web_1">
<aloqa:customLabel>Recommend</aloqa:customLabel>
</aloqa:recommend>
</aloqa:actions>
</aloqa:onView>
</Placemark>
<Placemark id="event_2" >
<name>Springfield University Mensa</name>
<description><![CDATA[On the upper floor there are two tables for free playing.
In the afternoon lots of students are waiting.]]></description>
<Style>
<IconStyle>
<Icon><href>http://media.example.com/230/131x182_0,1.jpg</href></Icon>
</IconStyle>
</Style>
<Point>
<coordinates>11.295,49.8035,0</coordinates>
</Point>
<aloqa:rating>5</aloqa:rating>
<aloqa:fbPlace>Springfield University Mensa</aloqa:fbPlace>
<aloqa:onView>
<aloqa:actions>
<aloqa:call>
<aloqa:number>141 321 4322</aloqa:number>
</aloqa:call>
<aloqa:map/>
<aloqa:web>
<aloqa:customLabel>Show Live-Cam</aloqa:customLabel>
<aloqa:url>http://example.com/cam-page?id=23552</aloqa:url>
</aloqa:web>
<aloqa:web>
<aloqa:customLabel>Rate loacation</aloqa:customLabel>
<aloqa:url>http://example.com/rate?id=23552</aloqa:url>
</aloqa:web>
</aloqa:actions>
</aloqa:onView>
</Placemark>
<Placemark id="event_3" >
<name>HBA Sports Center</name>
<description><![CDATA[The HBA provides a large sportive center including 10 foosball
tables for it's members.]]></description>
<Style>
<IconStyle>
<Icon><href>http://media.example.com/231/131x182_0,1.jpg</href></Icon>
</IconStyle>
</Style>
<Point>
<coordinates>11.2885,49.7886,0</coordinates>
</Point>
<aloqa:rating>2</aloqa:rating>
<aloqa:onView>
<aloqa:actions>
<aloqa:call>
<aloqa:number>141 321 9773</aloqa:number>
</aloqa:call>
<aloqa:map/>
<aloqa:web>
<aloqa:customLabel>Show website</aloqa:customLabel>
<aloqa:url>http://example-travel/showDetails?id=92321</aloqa:url>
</aloqa:web>
<aloqa:web>
<aloqa:customLabel>Rate loacation</aloqa:customLabel>
<aloqa:url>http://example-travel/rate?id=92321</aloqa:url>
</aloqa:web>
</aloqa:actions>
</aloqa:onView>
</Placemark>
</Document>
</kml>
Created: June 30, 2011
Updated: February 7, 2012
ECCN 5E991.NR: In accordance with United States Export Administration Regulations (EAR), and specifically the Commerce Control List (CCL), this item has been classified 5E991.NR. Export or re-export of this commodity and compliance with the U.S. Export Administration Regulations is ultimately the responsibility of the exporter. For more detailed information related to export or re-export of this item, please consult the EAR at http://www.access.gpo.gov/bis/ear/ear_data.html.