views:

149

answers:

2

Hello there,

I creating a flash app that loads a RSS of a plublic map with a custom route path and draws lines from the coordinates on a Away3D Sphere.

It works preety well when I'm testing locally, but when I publish online, the app can't load the RSS. I think Google Maps disable access from other domains.

Does anyone knows another way to access this map RSS directly from google? Now to fix this, I'm hosting the RSS.

Thanks in advance

Marlus

A: 

It may be easiest for you to simply implement a PHP proxy on the server that retrieves the RSS file for you. A concise article explains it here. I don't recall definitively, but I don't think Google Maps keeps a crossdomain file that would let you get at this feed otherwise.

Tegeril
Thanks for the link!But it not worked... I got the reponse:{errorText:"Não foi possível entrar em contato com o servidor."}// not possible to estabilish contact with the server
marlus
I'd be curious to know if CURL is configured properly...I just tested this code on my server and it's working properly as a proxy for me. How are you trying to load it?
Tegeril
marlus
i think curl is enabled: http://arquivos.de/argus/phpinfo.php
marlus
Hmmm, I'm honestly not sure how or what Google might be doing to block this from happening. The other thing I see as potentially problematic is passing a URL with a query string into another URL as a query string parameter. You may need some sort of escaping.
Tegeril
A: 

SOLVED

changed the RSS url on the xml_proxy.php file:

<?php

  $url = "http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;output=georss&amp;msid=".$_GET['msid'];
  $data = file_get_contents($url);
  print $data;

?>
marlus
Should mark a solution and/or uptick.
Tegeril