Can you please show me or direct me to a code snippet on how does this work? Mine is simply not working... I haved tried:
(considering my center of the screen to be the user position that I get from Location): Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); String zoomlevel = Integer.toString(mapView.getZoomLevel()); GeoPoint topLeft = mapView.getProjection().fromPixels(0, 0); GeoPoint bottomRight = mapView.getProjection().fromPixels(width, height); GeoPoint center = mapView.getMapCenter(); And I have tried: int latSpan = mapView.getLatitudeSpan(); int longSpan = mapView.getLongitudeSpan(); GeoPoint mapCenter = mapView.getMapCenter(); int latitudeToEdge = mapCenter.getLatitudeE6() + (latSpan/2); int longitudeToTop = mapCenter.getLongitudeE6() + (longSpan/2); GeoPoint edgeLocation; edgeLocation.setLatitude((float)latitudeToEdge/1E6); edgeLocation.setLongitude((float)mapCenter.getLongitudeE6()/1E6); topLocation.setLatitude((float)mapCenter.getLatitudeE6()/1E6); topLocation.setLongitude((float)longitudeToTop/1E6); centerLocation.setLatitude((float) (mapCenter.getLatitudeE6())/1E6); centerLocation.setLongitude((float) (mapCenter.getLongitudeE6())/1E6); I guess I have no mathematical clue on how to set this :S On Jun 25, 11:46 pm, Pedro Teixeira <pedroteixeir...@gmail.com> wrote: > Indeed, that example is exactly what I'm trying to achieve with my > application. > I'm just trying to get thoose coordinates now ;) > Thank you very much for your help. > > On Jun 25, 2010, at 9:15 PM, Frank Weiss wrote: > > > > > > > Exactly. You need to pass the neLatitude, neLongitude, swLatitude, > > swLongitude as query parameters to your back end web service, which > > then returns only POIs whose latitude and longitude fall within those > > bounds, like this Javascript Google Map does: > > >http://myhome.bankofamerica.com/?findmlo=94114#/findmlo/94105 > > > Notice that it even handles panning and zooming. > > > -- > > 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+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > Pedro Teixeira > > www.pedroteixeira.org -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en