Thursday, June 24, 2010

[android-developers] Re: Mapping (x,y) to (latitude,longitude)

It all depends on what zoom level you're at and what the center of the
map is set to. Everything else is relative to that. If you haven't set
your center or zoom level then you have no reference to the corners so
they will be unreal or if you get anything at all, will be irrelevant.

-John Coryat

On Jun 24, 3:47 am, Pedro Teixeira <pedroteixeir...@gmail.com> wrote:
> Hello,
>
> I'm trying to get the lat/long values, from the corners of the screen.
> But my getProjections don't make any sense.. I mean ...
> mymap.getProjection().fromPixels(0, 0) or
> mymap.getProjection().fromPixels(screenWidth, screenHeight)  just
> delivers me unreal numbers.. Can you help?
>
> I'm trying to set up an algorythm that would avoid cluster of graphics
> in the map and for that, the app needs to know which area of the
> screen is being showed latitude/longitude wise.
>
> For example:
>
> --------------------
> |                   |
> |                   |
> |                   |
> |                   |
> |___________|
>                 Point(280,250) in pixels = Geopoint(32,39274,
> -16,37547) in lat/long
>
> Any help ?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate