Creating A UTM Map with a Raster Pyramid Background Layers

With BlueSpray and CanvasMap, you can create your own raster background layers that are tiled so the user does not have to wait for the entire background file to load.

As the size and complexity of your data increases, your maps will begin to slow down. The solution for this is to load the map as "tiles". The tiles are arranged in "steps" from a few top tiles which represent the entire area of the layer at low resolution to a bottom step that can include thousands of tiles representing the highest resolution for the data.

Take a look at the California History map. The map is in UTM with a background created by Chris Muhl. The background is quite detailed so we've turned it into a pyramid of tiles.

Raster Pyramids

Large rasters need to be turned into "pyramids" of "tiles" to keep the performance fast. This can be done in BlueSpray by right clicking on a raster layer and selecting "Transforms (other) -> To Pyramid Layer ". This will create a pyramid of tiles in BlueSpray. Then, right-click and select "Export to File". Navigate to a folder for the pyramid files and elect "Canvas Map Folder" as the file type. Don't worry about the file name as BlueSpray will put a large number of files in the folder including "pngs" that represent the files, an "info.js" file with information on the raster, and a series of "tile" files with information on each tile.

var Layer_World=new CMLayerPyramid();

TheCanvasMap.AddBackground(Layer_World);

Layer_World.SetURL("/GISData/GoogleMercator/Pyramid/BlueMarble",TheCanvasMap.GetView()); 
Layer_World.SetName("BlueMarble");

Note that you do not need to provide the bounds as this is already defined by the tiling "info.js" file. You do need to call "AddBackground()" to add a tiled layer as a background but call "AddLayer()" if you want it to appear in the layer list.

Also note that the layer should be convered into the desired spatial reference before converting it to a pyramid.