Ok i think i got it , here is the code in case someone needs it...
var pixelcoord1={x:coord.x*256,y:coord.y*256,z:zoom} ;
var pixelcoord2={x:(coord.x+1)*256,y:(coord.y+1)*256,z:zoom} ;
var worldcoord1 = new google.maps.Point(pixelcoord1.x/
Math.pow(2,zoom),pixelcoord1.y/Math.pow(2,zoom));
var worldcoord2 = new google.maps.Point(pixelcoord2.x/
Math.pow(2,zoom),pixelcoord2.y/Math.pow(2,zoom));
var projection = map.getProjection();
var sw = projection.fromPointToLatLng(worldcoord1);
var ne = projection.fromPointToLatLng(worldcoord2);
On Feb 8, 10:34 am, "[email protected]" <[email protected]> wrote:
> var pixelcoord1={x:coord.x*256,y:coord.y*256,z:zoom} ;
> var pixelcoord2={x:(coord.x+1)*256,y:(coord.y+1)*256,z:zoom} ;
> var worldcoord1={x:pixelcoord1.x/Math.pow(2,zoom),y:pixelcoord1.y/
> Math.pow(2,zoom)};
> var worldcoord2={x:pixelcoord2.x/Math.pow(2,zoom),y:pixelcoord2.y/
> Math.pow(2,zoom)};
>
> now i need to convert world coordinates in lat/long or there is
> another step between this?
>
> On Feb 8, 10:18 am, "[email protected]" <[email protected]> wrote:
>
>
>
>
>
>
>
> > any example?
>
> > On Feb 8, 5:49 am, Martin <[email protected]> wrote:
>
> > >https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thre...
>
> > > Martin.
>
> > > On Feb 7, 11:51 pm, "[email protected]" <[email protected]> wrote:
>
> > > > Hello, I'm searching whole night for this, and i cannot get it still..
> > > > I want to get long/lat from NE,SW for each tile that loads , anyone
> > > > can help me out? I have parameters for X,Y,Z , how can i find out the
> > > > coords
--
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.