PDA

View Full Version : Needs help with google map rss feed implementation



snappy46
09-10-2010, 09:32 PM
Here's a post that I posted in some other forum but I was hoping someone here would also be able to help.

I have been experimenting with what seem to be a call to google api map that is build into DvdPlayer application ..... well maybe I am not sure. If one were to look at the weather feed once you selected the city that you want; you will see that the current weather details is obtain from this link: http://weather.yahooapis.com/forecastrss?p="+getStringArrayAt(la,%20-1)+"&amp;u=c and the forecast on http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query="+getStringArrayAt(fa,%20-1) . Now another very interesting thing on the weather page of course is the Google map; but I cannot find anywhere on the rss script where a call to google map is being requested therefore I believe that a google api call is build into the DvdPlayer application. It must be called upon when the <mediaDisplay name=weatherViewRss is found in the rss script. The Map displayed will be centered on the city you have selected therefore at some point that location must be read by the DvdPlayer to be able to call the google API with the right location. There is some kind of array created on the rss script that look like this:

<item>
<title>Philadelphia</title>
<cur>USPA1276</cur>
<for>Philadelphia</for>
</item>


This array is read by into two variable la and fa as follow:

la = getItemInfoArray("cur");
fa = getItemInfoArray("for");

I believe that the variable "la" which is equal to <cur> is the one used to send the location to the google API although I have no idea how this is done. This is a unique WOEID code which is different for any location on the earth. So if you want to create just a google map on the screen you only have to remove the extra stuff dealing with weather and change the following parameter in the rss weather feed (This would be the country one usa.rss, england.rss etc...) to the following:


mapPictureXPC=0
mapPictureYPC=0
mapPictureWidthPC=100
mapPictureHeightPC=100


Now you have a google map that fill in the whole screen that you can move around using the arrow buttons on your remote (up,down,right,left) and zoom in/out using the prev/next buttons. Great now I have a full size map that I can display and move around so what's my problem. Well the problem reside in the mystery with regards to how do I pass variable to the Google api. In other words are there any other mapPicture related goodies that I can use. Some of the current problems are:

The resolution is not very good. Although the picture seem to have the proper aspect ratio I have a feeling the google api call only request a map size of maybe a fourth of the actual resolution base on the mapPicturewidthPC or height and the current TV resolution 1080 or 480 etc..... I am guessing performance over quality.

The zoom factor is limited in and out I would like to be able to zoom in closer and zoom out further when required.

I was not able to change the map type; it's always seem to be satellite picture, it would be nice to be able to have road or terrain as well as satellite.


Now if it wasn't for those issues we could have ourself a real good google earth rss feed that would look great .... how would you like to see your park car in the drive way!!!

Finally here's my question, does anyone knows of any variable that can be pass to the mapPicture type variable that would allow to specify map resolution (width matching the same as screen), variable to change the zoom limit, and a variable to change the map type???????

Yes I know I could create an rss feed with my own call to the google map api but so far I have not been successful to display them and it would be a lot easier to modify the current weather rss feed and use what appear to be the built in capability of the DvdPlayer application (firmware) for google map api call.


EDIT: Ok I figure out how to change map type by pressing the #1 (Satellite view) #2 (Road Map view) on the remote. One problem solved two more to go.

snappy46
09-11-2010, 05:03 AM
Ok I manage to find the google api call in the DvdPlayer application and realized that it uses longitude / Latitude to determine the centre of the map to be displayed. So the information store in the rss feed for location is only used for the current weather and forecast weather. In a manner of fact the longitude /latitude is return by the current weather forecast: http://weather.yahooapis.com/forecas...0-1)+"&amp;u=c Hence you can not remove that api call since the google api call in DvdPlayer uses that data. It appear that all the data from the yahoo api weather call is store in variable in the DvdPlayer application and then use by DvdPlayer to display the forecast information as well as the Map. So it is better to leave the weather data/format there and just make the text the same color as the background that way you won't see the text before the map shows up.