IlvMapsError status; IlvGeoTIFFReader* reader = new IlvGeoTIFFReader(filename); status = reader->getInitStatus(); if(status != IlvMaps::NoError()) return status; const IlvMapFeature* feature = reader->getNextFeature(status); if(status != IlvMaps::NoError()) return status; IlvFeatureRenderer* renderer = reader->getDefaultFeatureRenderer(display); // Image is known to be in the geographic projection. IlvGeographicProjection* projection = new IlvGeographicProjection(); IlvMapInfo info(projection); IlvGraphic* graphic = renderer->makeGraphic(*feature, info, status); IlvManager* manager = new IlvManager(display); manager->addObject(graphic, IlFalse); return IlvMaps::NoError(); |