Maps > Predefined Readers > The Image File Reader > Examples
 
Examples
In the following code extract, the tile loader will search for a file named tiles/tile_010_20.jpg when attempting to load the tile at column 10 and row 20.
IlvImageTileLoader loader =
new IlvImageTileLoader(display,
"tiles/tile_%c_%r.jpg",
"%03d",
"%02d",
adapter);
Once the naming scheme is determined, you can use the IlvImageTileLoader as any tile loader by associating it with an IlvTiledLayer.
IlvImageTileLoader* loader =
new IlvImageTileLoader(display,
"tiles/tile_%c_%r.jpg",
"%03d",
"%02d",
adapter);
status = loader->getInitStatus();
if(status != IlvMaps::NoError())
return status;
IlvTiledLayer* tiledLayer = new IlvTiledLayer(getTileOrigin());
tiledLayer->setTileLoader(loader);

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.