i''ve seen that site it can give me the latlng, but i'm still tryng to
figure out how to get the tile coordinates.

On Sep 19, 3:08 pm, "[email protected]" <[email protected]>
wrote:
> On Sep 19, 1:54 pm, Mario <[email protected]> wrote:
>
>
>
>
>
> > I've been trying to figure this out on my own but its not working.
>
> > All I want is a simple way to have LatLag and the tile show up when I
> > click on my map.
>
> > I was able to get it to work in v2 but I can't figure out how to do it
> > in v3.
> > here is the v2 code i used
>
> > GEvent.addListener(map,"click", function(overlay,latlng) {
> >       if (overlay) {
> >         return;
> >       }
> >       var tileCoordinate = new GPoint();
> >       var tilePoint = new GPoint();
> >       var currentProjection = G_NORMAL_MAP.getProjection();
> >       tilePoint = currentProjection.fromLatLngToPixel(latlng,
> > map.getZoom());
> >       tileCoordinate.x = Math.floor(tilePoint.x / 256);
> >       tileCoordinate.y = Math.floor(tilePoint.y / 256);
> >       var myHtml = "Latitude: " + latlng.lat() + "<br/>Longitude: " +
> > latlng.lng() +
> >                    "<br/>The Tile Coordinate is:<br/> x: " +
> > tileCoordinate.x +
> >                    "<br/> y: " + tileCoordinate.y + "<br/> at zoom
> > level " + map.getZoom();
> >       map.openInfoWindow(latlng, myHtml);
> >     });
>
> > now with V3 I'm using the ImageMapType since the G... stuff is
> > depreciated.  I tried to look over this example
>
> >http://code.google.com/apis/maps/documentation/javascript/examples/ma...
>
> > but its way to complicated for me to figure out.  
>
> Does this help?http://www.geocodezip.com/v3_example_click2add_infowindow.html
>
>   -- Larry
>
>
>
> > I've looked at other
> > examples too but can't seem to get any of them to work in the same
> > way.  I should point out that i'm also a self taught coder so I'm
> > figuring out things as I go.
>
> > if you can give me some advice or even rewrite the above so its v3
> > compatible I'd really appreciate it.

-- 
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.

Reply via email to