I think I'm on the right track. In the getTile function it creates all
the tiles for the map and returns each of them. Obviously each tile is
placed accordingly on the page. My idea was to fetch this position in
the getTile function and when I view a tile DIV it does show the
position on the page. However, the div does not get created in getTile
so it has no position yet, it returns it to another function so I
cannot access the position. What does getTile return to? I think if I
try to access the position from there, I can get it all working.

On May 28, 7:00 pm, Jason Kaczmarsky <[email protected]> wrote:
> Alright I got something figured out. I found out how to calculate the
> tile at which a certain point it located based on the zoom level. I
> still don't understand how I can translate the tile/point position to
> workable coordinates.
>
> I believe if I can get a particular tile's position relative to the
> window position, I can then get the difference and draw a marker based
> on that.
>
> Don't know if it's obvious, but I'm working in JavaScript and I would
> like to draw a div at each point. If I can get the relative position
> of a tile to the window, I can absolutely position a div relative to
> the tile's X/Y values in the window.
>
> On May 28, 6:05 am, John Coryat <[email protected]> wrote:
>
>
>
>
>
>
>
> > You can convert a pixel coordinate into a latitude and longitude fairly
> > easy. One thing you need to consider. All pixel coordinates are based on a
> > particular zoom level. If all your pixel coordinates are assuming one static
> > layer, you'll have to figure out what corresponding zoom that represents and
> > calculate latitude and longitude based on that.
>
> > Here's a Perl module with the tile math.
>
> >http://www.usnaviguide.com/google-tiles.htm
>
> > Hope that helps.
>
> > -John Coryat
>
> >http://maps.huge.info
>
> >http://www.usnaviguide.com
>
> >http://www.zipmaps.net

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