It is difficult to make an estimate by just multiplying by 4 because, as you can probably see, the country only occupies part of those tiles at level 6. It would be more accurate to calculate the number for each zoom level using the projection's conversion to pixels. That is:
- Get the GLatLngBounds of the country - Convert each corner of the bounds to pixels, usin GProjection ().fromLatLngToPixel() - Calculate the pixel width and height (East pixel - west pixel and south pixel- north pixel) - Divide the pixels by 256 - Repeat for each zoom level and add This still would not be 100% accurate because the country is not a rectangle, but it would be closer. In any case, why do you need to know the number of tiles, if I may ask? ;-) -- Marcelo - http://maps.forum.nu -- On Jul 15, 10:38 am, Salvin <[email protected]> wrote: > hi > i'm planning to to create a map using tiles overlay and i have some > problems estimating how many tiles i would need to create. > > I want to cover whole area of Poland starting at zoom level 6 to 11th > are my calculations correct? one gives me ~800 tiles another something > like 25K > > at lvl 6 there are 6 tiles so we have 6*4^(11-6) where 4 is number of > tiles at each sublevel of parent tile > > thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
