On 01/08/2009, Barry Hunter <[email protected]> wrote:
> On 01/08/2009, S.Choe <[email protected]> wrote:
> >
> > That is to say, I would like to implement function:
> > For given area [minx, miny, maxx, maxy],
> > generateTile([minx, miny, maxx, maxy], [minzoom, maxzoom]) will
> > returns
> > array of tile images which covers all the area and for given interval
> > of zooms.
>
>
> woulding it just be
Duh, of course its not! Blame lack of caffine!
But as Marcalo says you should have a lat/long to tile conversion, so
just implement the function in lat/long space and use the conversion.
Probably put the zoom as the outer loop, and the vary the 'step' of
the lat/long loops depending on zoom level. (or just put the step
really small, and check if you done that tile already and skip it)
>
> function generateTile(minx, miny, maxx, maxy, minzoom, maxzoom) {
> list = array();
> foreach x (minx..maxx) {
> foreach y (miny..maxy) {
> foreach z (minzoom..maxzoom) {
> list[] = array(x,y,z);
> }
> }
> }
> return list;
>
> }
>
>
>
>
> >
> > For any given area and zoom, how do i compute grid of tiles (tile.x,
> > tile.y)?
> >
> > Thank you.
> >
> > SK.
> >
> > > >
> >
>
>
>
> --
> Barry
>
> - www.nearby.org.uk - www.geograph.org.uk -
>
--
Barry
- www.nearby.org.uk - www.geograph.org.uk -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---