Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Baxslash Pinch Zoom with Google Maps

Author
Message
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 13th May 2013 01:44
I have been playing around with the Google Maps API and realized I could pull down map images with AGKs HTTP commands.

So I mixed that with Baxslashes awesome Pinch and Zoom tutorial and made an app that displays a map - see attached.

My question:

Looking over the Google Maps documention, I see its possible to derive a pixel coordinate from a world coordinate. That would be useful to display markers, icons etc at real locations. However I'm clearly missing a core concept because my attempts at the conversion


using
results in nonsense numbers.

Does anyone know how to convert them?

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th May 2013 09:56
This is really cool. Nice work!

I think of the co-ordinates would change as the user zoomed it would work even better as currently the only way to navigate around is by entering co-ordinates in the boxes. A little more work and you have a handy little bit of code there.

I haven't time to check your other problem but if I get a chance I'll look into it.


this.mess = abs(sin(times#))
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 13th May 2013 14:30
Thanks!

Yes, I think I need to determine the lat/long of the center position of the screen to find out if another tile needs to be downloaded, hence the pixel coordinate question. Drag the viewport to edge of tile, create a new tile sort of thing.

I got sidetracked trying to make the Editboxes play nice with being Fixed to the screen, hence the hidden sprites setting the Editbox's focus when tapped on.

Login to post a reply

Server time is: 2024-04-26 20:35:00
Your offset time is: 2024-04-26 20:35:00