Well, in order to use two points for this, you need one point in the
center of the map and the other in what you want to be one of the
corners of the map. As long as you have the lat/long of the center,
the distance, and the angle formed between the horizontal line and the
line from center to corner, you can figure out the lat/long with trig.

Now if you want to do this with 3 points, it might be easier. Have one
point on the top/bottom edge of the map (you know it's a certain
number of miles away from the center) and one point on the left or
right side of the map (however many number of miles). That way, you
are only changing one value (either lat or long) for each point. Then
it's just a simple calculation of how many miles per degree.

On Apr 8, 4:26 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I don't understand..How can you figure out the edge lat/lon that I
> need for the "zoomToSpan"?
> I know the lat/lon of the center of the map, and I know the distance
> between the two points.
> What do I need to do now?
>
> Thanks,
> Noam.
>
> On Apr 7, 9:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Nevermind, I got that with the midpoint 
> > formula:http://www.purplemath.com/modules/midpoint.htm
>
> > Thanks,
> > Noam.
>
> > On Apr 7, 9:09 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > And how could I figure out the coordinates of the center of two
> > > locations?
>
> > > Thanks,
> > > Noam.
>
> > > On Apr 6, 11:07 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > > > You should use zoomToSpan instead of zoomTo, but you still need to
> > > > calculate the latitude/longitude (which you'd likely need to do anyway
> > > > with zoomTo). You should be able to do a google search for information
> > > > on lat/long calculations. I think you'd basically have to figure out
> > > > how many feet (or in your case miles) per degree of lat/long, then add
> > > > that many degrees to the lat/long of the center of your map to get the
> > > > lat/long of the edge to use in zoomToSpan.
>
> > > > On Apr 6, 9:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > Hello everyone,
> > > > > I want to get the zoom number from a distance.
> > > > > For instance,
>
> > > > > int distance = 999;
>
> > > > > Now, how could I calculate the amount of zoom needed so I can see all
> > > > > of these 999 miles on the map?
> > > > > Ex.
>
> > > > > int distance = 999;
> > > > > MapView mMapView = new MapView(this);
> > > > > MapController mc = mMapView.getController();
> > > > > //let's say that I calculated that the amount of zoom is 10
> > > > > //here I need to actually calculate this
> > > > > mc.zoomTo(10);
>
> > > > > Thanks,
> > > > > Noam.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to