You could add two GTileLayerOverlays on top of each other.
One GTileLayerOverlay has the left tiles, and the rest are blank,
(transparent), tiles, and the other GTileLayerOverlay has the right
tiles, and the rest are blank tiles.

Then on your script, you can do map.getBounds() and split it in two,
and based on that you can decide which tiles to serve to each
GTileLayerOverlay.
You might want to add a random parameter to the tileUrl in order to
prevent caching of the tiles.
The problem you might have is that the center longitude of the map
will (most likely) not coincide with the edge of a tile, so the split
would not be exactly half-half.

Another alternative might be to use two synchronized maps next to each
other:
http://maps.forum.nu/gm_maps_in_sync2.html


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





1. Use two GGroundOverlay
http://code.google.com/apis/maps/documentation/reference.html#GGroundOverlay



On Jan 7, 6:56 pm, Kesuke <[email protected]> wrote:
> I am trying to find a way of hiding just the left half or just the
> right half of a GTileLayerOverlay. (The user will choose which side
> with a checkbox, but that isn't important).
>
> My first thought was to create two GLatLngBounds variables, one for
> the left half of the map and one for the right half. Called, leftbox
> and rightbox.
>
> What I now need is code that does something like;
>
> if (checkbox for leftbox = true) {hide all the tiles for
> GTileOverlayName that are underneath leftbox} else {do nothing);
>
> Any ideas how this could be achieved? The checkbox part/if statement
> isn't a problem. But how can I selectively hide parts of a
> GTileLayerOverlay, based on GLatLngBounds
>
> Thanks
-- 
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