On Mar 15, 3:50 am, B <[email protected]> wrote:
> I am serving .png tile overlays that periodically change.
>
> In the browser, if one of the tiles someone is currently looking at on
> their map canvas has changed, I want to tell the broswer to fetch the
> new version of the tile from the server.

Just add a randon parameter at the end of the tile url, such as

myLayer.getTileUrl = function (a,b) {
  return 'http://'+window.location.host+'/tiles/'+a.x+'&y='+a.y
+'&z='+b + '&random=' + Math.random();
};

If tiles change at regular intervals, then the parameter could be a
date and time, or part of it.

To reload the layer, if it is a GTileLayerOverlay then removeOverlay()
and addOverlay() again.
If it is a GTileLayer which is part of a GMapType change the map type
to something else and change it back.

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











>
> I assume this means telling the Google Maps Overlay to refresh itself
> somehow?
>
> I saw a request for something like this for Flash API (which I know
> nothing about) but is this also avaliable using the javascript api?
>
> Here is where I saw the 
> request:http://code.google.com/p/gmaps-api-issues/issues/detail?id=503
>
> Just in case, to make the problem more concrete here is the sequence:
>
> 1. "tile_z_x_y" changed on the server -- say from the drawing of a red
> polygon from someone's recent disaster assessment report.
>
> 2. Periodically based on javascript code, the client sends requests to
> the server to compare if the tiles stored in its browser's cache have
> changed on the server's database (say with a recorded update time
> stamp).
>
> 3. If some one is looking at a tile on her browser that doesnt show
> the most recent information then the browser needs to somehow fetch
> this new overlay, without spending time reloading the whole Google
> Maps API.

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