See my MTileNumberControl here:
http://maps.forum.nu/gm_custom_controls.html

I know, it's buggy, but it is just a "proof of concept" that might
help you get on the way.

--
Marcelo - http://maps.forum.nu
--


On Aug 28, 11:26 pm, Paul Kulchenko <[email protected]> wrote:
> I'm writing visualization using canvas and would like to align my
> canvas objects with map tiles. Right now I'm using GTileLayer and
> toDataUrl to generate data: URLs and everything works fine.
> Unfortunately, one of my target platforms doesn't support toDataUrl,
> so I need to find some other mechanism.
>
> I'm considering generating one canvas per tile and the problem is with
> aligning my elements with the tiles; every generated image has this
> style:
>
> <img style="border: 0px none ; margin: 0px; padding: 0px; position:
> absolute; left: 315px; top: -149px; width: 256px; height: 256px; -moz-
> user-select: none; opacity: 0.5;"
>
> I'm after these "left: 315px; top: -149px;" coordinates to position my
> object in exactly the same way as this particular tile. Is there a way
> to find the image for a tile (its DOM object) based on having tile.x,
> tile.y and zoom information without doing brute force scanning of
> "map" element children searching for images with the right src value?
>
> Also these coordinates seem to change when the map is moved (not with
> every move, but when new tiles are loaded). I can probably have
> DOMListener to handle that, but the same question remains: how do I
> find what new coordinates are assigned to the tile that my particular
> div/canvas is covering?
>
> Is there a better way to align my elements with tiles? I wish there
> was a getTileDiv as there is getTileURL.
>
> Paul.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to