Hi Ryan,
Please check this function:
getRadius : function() {
/** Gets the radius, in m, from the current center to the
closest edge of the map. **/
var center = this.map.getCenter();
var mapBounds = this.map.getBounds();
var ne = mapBounds.getNorthEast();
var northEdge = new google.maps.LatLng(ne.lat(),
center.lng());
var eastEdge = new google.maps.LatLng(center.lat(), ne.lng());
return Math.min( center.distanceFrom(northEdge),
center.distanceFrom(eastEdge) );
},
It throws an exception on center.distanceFrom().
Note that LatLng does not have a method distanceFrom in v3.
An example of how to calculate the distance between two latlngs is
available here:
http://stackoverflow.com/questions/1502590/calcualte-distance-between-two-points-in-google-maps-v3
On May 2, 3:55 am, ryan baldwin <[email protected]> wrote:
> Hi Susannah, sorry for the delay... I had to deploy a new version to
> appspot.
>
> http://tweeteo.appspot.com
>
> I'm in the midst of updating it from using v2 to v3, so almost nothing works
> anymore that's interesting, but you should be able to see the odd behaviour
> I was witnessing.
>
> I'm running a Nexus One with the stock Android 2.1, using Chrome mini (or
> whatever that browser on android is called).
>
> - ryan.
>
> On Fri, Apr 30, 2010 at 10:00 PM, Susannah (Google Employee) <
>
>
>
>
>
> [email protected]> wrote:
> > Hi Ryan,
>
> > Can you provide a link for the site where you saw this problem?
>
> > Thanks,
> > Susannah
>
> > On May 1, 7:36 am, ryan baldwin <[email protected]> wrote:
> > > I was playing today with the v3 js API, interacting with the map from
> > > desktop was working fine. However, interacting with the map from my
> > > Android or iPhone produced very odd behaviour. After I "scrolled" the
> > > map with my thumb, anytime my thumb even TOUCHED the map, the map
> > > would jump to whatever direction (north, east, south or west) my thumb
> > > was of the center of the map. It's very frustrating and unpredictable
> > > and makes using the map (including zooming) impossible.
>
> > > Is this a known issue?
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > > To post to this group, send email to
> > [email protected].
> > > To unsubscribe from this group, send email to
> > [email protected]<google-maps-js-api-v3%2B
> > [email protected]>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-maps-js-api-v3%2B
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.