How does TileLayer work?

Jan 6, 2009 at 4:37 PM
Pardon my ignorance, but even after viewing the source code i am not sure how Layers work.
The following are technical questions relevant to me as I am trying to extend upon DeepEarth:

- For the default BaseLayers for the implementation, how does "it" know what the TileURL should be?
- Map has a MultiScaleImage member. When switching between BaseLayers is the msi object being assigned and thus releasing the previous setting (or is it cached somehow)?

Jan 12, 2009 at 7:25 PM
Hi ed,

Im no Deep Earth specialist, but still I might be of some assistence here.

- A tilelayer is used as a baselayer for showing the tiles that make up the appearance of the world.
Each tile shows an image that can be retrieved from the Internet by a URI.
When for instance you want to retrieve tile images from OpenStreetMaps, you just type a url with some coordinate + level parameters at the end.
A tile baselayer retrieves these tile images by creating a URI for each tile on its layer.
For this it must know the long/lat coordinates of a tile.
These coordinates are calculated by DeepEarth. (Each x,y coordinate on the screen can be mapped on long/lat coordinates - DeepEarth does the math here)
With these coordinates it is just a matter of creating the URI and retrieving the image (this is what happens in the GetTile() methods of the Tilelayers in DeepEarth)

- This I don't know. But when switching a baselayer (choosing a new tile provider source), my guess is that nothing is cached (except for the images that are cached on the client - tempfolder).