IlvMapsError status; // The image is known to be at 77 degrees 30 seconds east // and 10 degrees north for the upper-left corner. // Lower-right corner is at 82 degrees 30 seconds east // and 5 degrees north. IlvCoordinate ul(77.5, 10); IlvCoordinate lr(82.5, 5); IlvImageReader* reader = new IlvImageReader(display, fileName, ul, lr); status = reader->getInitStatus(); if(status != IlvMaps::NoError()) return status; IlvMapFeature* feature = (IlvMapFeature*)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* mapInfo = new IlvMapInfo(projection); feature->setProjection(projection); IlvGraphic* g = renderer->makeGraphic(*feature, *mapInfo, status); if(status != IlvMaps::NoError()) return status; IlvManager* manager = new IlvManager(display); manager->addObject(g, IlFalse); return IlvMaps::NoError(); |