On Dec 3, 7:00 pm, scott <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I have search the API, but cannot find a way to tell google maps that
> I only want it to request tiles within a given lat/long boundary.  My
> code is simple:
>
>                 var tl = new GTileLayer(null, null, null, {
>                         tileUrlTemplate: '/tiles/reefs/{Z}/{X}_{Y}.png',
>                         isPng:true,
>                         opacity:1.0 });
>                 var tileLayerOverlay = new GTileLayerOverlay(tl);
>
>                 map.addOverlay(tileLayerOverlay);
>
> But i only have tiles within a small subset of the world, and would
> like to prevent unnecessary requests.  Is it possible to clip the
> boundaries of a tile overlay?
>
> thanks.
> Scott

Check out Sparse Tile Layer Overlays:

    www.polyarc.us/sparsetile.js

Dynamic maps version:

    www.polyarc.us/sparse

Static maps version:

    www.polyarc.us/poly

Both combine several sparsely populated tile sets into a single
overlay.  It does not require multiple overlays.  It does not attempt
to fetch missing tiles.  It is useful for changing the collection of
tile sets on the fly.  The static map version has some improvements
not made in the dynamic map version.

It can be done also using GTileLayerOverlay for a single set of
tiles.  A template will not work because you cannot apply a bounding
box.  In your "getUrl" method, substitute Google's "transparent.png"
image for tiles not available from your tile server.

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