How to scroll static google map image ?

Login to reply to this topic.
Tue, 2008-08-19 14:04
Joined: 2008-06-18
Forum posts: 7

Hello, I'm new to symbian C++,
how is possible to scroll a google static map image?
So far, i'm downloading a JPG image in the device, than i load it using CImageReader class but i cannot scroll it (i'd need to download another picture).Actually what i do not know is how to get the coordinate of latitude and longitude of the center of the new static map that i have to download.I got a code to adjust the coordinates & pixels of image in forum,i.e.,
I think its java code !!

"x" is Latitude in fractional degrees
"y" is Longitude in fractional degrees
"deltaX" is positive / negative Latitude adjustment in PIXELS
"deltaY" is positive / negative Longitude adjustment in PIXELS
"z" is zoom level

function Adjust(x,y,deltaX,deltaY,z)
{
var offset=268435456;
var radius=offset/Math.PI;

function LToX(x)
{
return Math.round(offset+radius*x*Math.PI/180);
}

function LToY(y)
{
return Math.round(offset-radius*Math.log((1+Math.sin(y*Math.PI/180))/(1-Math.sin(y*Math.PI/180)))/2);
}

function XToL(x)
{
return ((Math.round(x)-offset)/radius)*180/Math.PI;
}

function YToL(y)
{
return (Math.PI/2-2*Math.atan(Math.exp((Math.round(y)-offset)/radius)))*180/Math.PI;
}

return {x:XToL(LToX(x)+(deltaX<<(21-z))),y:YToL(LToY(y)+(deltaY<<(21-z)))};
}

I'm not getting how to use dis function, if any 1 know about dis plz help me out.

With Regards !!
Vinod


Tue, 2008-08-19 21:10
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: How to scroll static google map image ?

Please do not post the same question several time.

What is your problem about ? Scrolling inside image ? OR computing the lat/long coordinate of the center ?


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Wed, 2008-08-20 08:11
Joined: 2008-06-18
Forum posts: 7
Re: How to scroll static google map image ?

Hi Eric,
Thxs for reply. Sorry 4 tht multiple posts. I thought if I post in network & Multimedia section I may get solution. Well, problem is I'm using the LBSSample symbian application in my device & I'm downloading the static google map image. Now I want to user should able to scroll the image left side /right/up/down & in mean time I should calculate new lat/long coordinate of the image center so that I can download new image.If possible give me any solution or any document related to this problem. Thanks in advance.

With Regards !!
Vinod

  • Login to reply to this topic.