Google maps w/ satellite imagery

Jeremy Malczyk jmalczyk at YAHOO.COM
Thu Apr 7 15:16:26 EDT 2005


>So it sounds like you are generating all of the tiles statically and
>then just serving those up via javascript?  Has anyone tried using
>mapserver to tile on the fly, i.e. use mapserver to generate image tiles
>at certain zoom levels based on feedback of the user searches.  Then
>store tiles in a server cache.  When users request a map, have the
>server check the server tile cache, before kicking off mapserver to
>create new tiles.

That's an interesting idea. It would get around the issue of updating tiles
(which, for me, is the main disadvantage of a tiled system) if you
incorporate some kind of verification of mapfile updates before grabbing a
cached tile.

On another note, a lot of the perceived extra speed of Google's maps comes
from the client side caching of tiles outside the viewable map area. If you
really pan quickly, this advantage goes away, but I suspect that most users
don't pan much faster then the server can refresh. With MapServer, a similar
solution might be to initially load a map some size larger than the viewable
area, then have your javascript only request maps for the blank spaces as
the user pans around. For any given pan you'll only need, at most, two
dynamically sized tiles. Since these tiles will always be equal to or
smaller than the viewable area, you aren't asking any more of mapserver than
you normally would be, in terms of area anyway. You would be asking for two
small maps instead of one bigger one, which might actually be slower. Even
if it is though, the perception by the user will be increased speed as they
pan around an area, because their client will likely be using cached tiles
as they pan back over areas they've already seen.

The hard part of such a system would be keeping track of these dynamically
sized tiles cached on the client, and getting your labels right, but it
doesn't seem impossible. The label issue might be solved by pulling a
seperate "normal" labels-only mapserver layer after the base map loads. That
way each pan reveals more map, and the user only has to wait for mapserver
to create new labels.


Jeremy



More information about the mapserver-users mailing list