Start a new topic

how to autorefresh a KML URL based world ?

how to autorefresh a KML URL based world ?


Hello

I have published my first world (Avignon - Vélopop', key = giofdai) based on an automatically generated KML file on my website  : http://www.alpha-pyxidis.com/velopop/velopop.php

It shows the availability of the bikes at the different bike-rental stations in the city center of Avignon.

The PHP script parses  the data from the website http://www.velopop.fr/stations.html and generates the KML-formatted data to be published into the Wikitude world.

How can I refresh automatically the data in the world ?

I have tried to use a redirection from a static KML file using the <networklink> tag and its <RefreshInterval> value, but it doesn't seem to work (you can find it at URL http://www.alpha-pyxidis.com/kml/velopop.kml). The 2nd world's key is : kinhodv

When I load this "static" KML into GoogleEarth the data are automatically refreshed every 5 min, but within Wikitude published world, I have a "no POI available" message.

Is there any automatic-refresh capabilities using KML or ARML ?

Thanks for your help.

Vincent

Hi Vincent,

First of all thanks for your interest in Wikitude and for your efforts in using it!

Regarding the "refresh topic", there are a couple of suggestions I can give you:

A) In our systems KML format is intended to be a static resource. In facts, it is an XML file which needs to be updated manually in the DevZone when you want edit its content.

B) The good news is that our systems support also dynamic resource as your own Web Service(s) . Unfortunately, you have to switch to ARML format (http://openarml.org).

So, once you have a WS delivering proper ARML content

=> go into the DevZone panel,

=> select ARML type for the new World 

=> submit your WS endpoint

=> test your new World into Wikitude Browser through its developer key

If everything works as expected then be sure your World is in Public mode (and not in Draft mode) and wait 24h in order to see it appearing in the entire application. This interval might be needed just at a first setup.

Let us know if you experience any problem during this process: we will assist you as fast as possible :)

Have a nice day,

Simone

Hello 

I have tried to change my PHP script to generate an ARML file instead of KML, but when I try to publish a new worl using my new URL (http://www.alpha-pyxidis.com/wikitude/velopop-arml.php) I got an error message :

"not a valid ARML file or does not deliver content provider"

I don't understand. Can you check this following example of the ARML I generate, because at this point I don't see if I missed something.

Thanks a lot for your help

Vincent

 

 

<?xml version="1.0" encoding="UTF-8"?>

<kml xmlns="http://www.opengis.net/kml/2.2"

     xmlns:ar="http://www.openarml.org/arml/1.0"

     xmlns:wikitude="http://www.openarml.org/wikitude/1.0">

<Document>

        <ar:provider id="alpha-pyxidis.com">

            <ar:name>Avignon - Vélopop'</ar:name>

            <ar:description>Les stations de location de vélos en libre-service en Avignon.</ar:description>

            <wikitude:providerUrl>http://www.velopop.fr</wikitude:providerUrl>

            <wikitude:tags>vélo, location, libre-service, Avignon, Vélopop'</wikitude:tags>

            <wikitude:logo>http://www.alpha-pyxidis.com/wikitude/velopop_logo.png </wikitude:logo>

            <wikitude:icon>http://www.alpha-pyxidis.com/wikitude/velopop_icon.png </wikitude:icon>

            <wikitude:shortName>Vélopop'</wikitude:shortName>

<wikitude:promotionText>Données agrégées par http://www.alpha-pyxidis.com - derni?re actualisation 19-03-2013 12:32</wikitude:promotionText>

            <wikitude:promotionGraphic>http://www.alpha-pyxidis.com/wikitude/velopop_graphic.png</wikitude:promotionGraphic>

            <wikitude:hiResIcon>http://www.alpha-pyxidis.com/wikitude/velopop_hiRes_logo.png</wikitude:hiResIcon>

            <wikitude:featureGraphic>http://www.alpha-pyxidis.com/wikitude/velopop_promotion.png</wikitude:featureGraphic>

            <wikitude:noPromotion>true</wikitude:noPromotion>

        </ar:provider>

<Placemark id=1>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.800287, 43.963305,0</coordinates>

</Point>

</Placemark>

<Placemark id=2>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.808575, 43.9429,0</coordinates>

</Point>

</Placemark>

<Placemark id=3>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.822222, 43.941944,0</coordinates>

</Point>

</Placemark>

<Placemark id=4>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.821389, 43.939167,0</coordinates>

</Point>

</Placemark>

<Placemark id=5>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.828687, 43.947767,0</coordinates>

</Point>

</Placemark>

<Placemark id=6>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.805833, 43.939444,0</coordinates>

</Point>

</Placemark>

<Placemark id=7>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.810278, 43.937778,0</coordinates>

</Point>

</Placemark>

<Placemark id=8>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.817007, 43.946397,0</coordinates>

</Point>

</Placemark>

<Placemark id=9>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.814722, 43.943889,0</coordinates>

</Point>

</Placemark>

<Placemark id=10>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.799444, 43.943611,0</coordinates>

</Point>

</Placemark>

<Placemark id=11>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!></name>

<description><!></description>

<wikitude:info>

<wikitude:markerIconUrl>http://www.alpha-pyxidis.com/wikitude/velopop_cb.png</wikitude:markerIconUrl>

</wikitude:info>

<Point>

<coordinates>4.819661, 43.950911,0</coordinates>

</Point>

</Placemark>

<Placemark id=12>

<ar:provider>alpha-pyxidis.com</ar:provider> <name><!

Hi Vincent,

I'm truly glad to see you transform the WS in order to deliver ARML responses.

At first, we should start from few tips in order to arrive to a working version of the document ;)

In facts, I noticed that:

a) The 'id' attributes for <Placemark> tags missed the comma, e.g. <Placemark id=3>, whenever it should be <Placemark id="3"> .

b) The MIME TYPE of the response looks to be still "text/html" . Instead, I would suggest you to deliver a proper MIME TYPE like "text/xml".

Let start with those points, and then refine the response until we get a proper result.

Ping me as you are ready;-)

Have a nice day!

Simone

Hi Simone

Thanks for your answer. I have fixed the problem. As you've suggested I have added the missing double-quotes around the placemark ids.

I also saw on an other ticket that some  blank line at the beginning of the ARML data stream should also cause the same error.

It was the case for my PHP script. I was generating a blank empty line before sending the first <?xml markup. I changed that and it is now working.

The world dev-key is "fdguzwg"

Now that I have a WS-based on ARML file generation, how can I refresh periodically the data published in this World ? Is there any interval parameter I should set somewhere ?

I've noticed that, unlike with KML, now the data are refreshed when I first connect to the ARML world.

But once I have loaded the data, I have to quit the Wikitude App to have the data refreshed.

Thks a lot for your help

Vincent

 

 

 

Heil? Vincent,

I'm happy to hear that the problems are gone now!

Our system will periodically check if your WS is up and running: in this case your WS will be always in the loop.

Concerning the refresh of the data "client-side", you have to keep in mind that there are some policies used by Wikitude World Browser in order to refresh data under certain circustamces. This approach won't overload the WS with too many requests.

Regarding the refresh of the data "server-side", it is up-to-you to your Server to decide the right policies.

If you have any other questions then please don't hesitate to contact us.

Thank you very much for your interest!

Kind Regards,

Simone

Hello Vincent ,

Can you give me the sample source code in PHP to generate the ARML file .

Thanks 

-Sadiq
Login or Signup to post a comment