Hello, im trying to get the LoadTilesForSnapshot function to run.
Using a function to load the tiles for snap (LoadTiles()), and then take the snap after the tiles is loaded (AxMap1_TilesLoaded()). But the event is never fired through the LoadTilesForSnapshot(). The only way i can fire the event is changing the extents for the AxMap it self.
public Boolean LoadTiles(MapWinGIS.Extents ext, AxMapWinGIS.AxMap axMap)
{
Boolean res = axMap.LoadTilesForSnapshot(ext, 700, "SnapKey");
//axMap.Extents = ext;
return res;
}
private void AxMap1_TilesLoaded(object sender, AxMapWinGIS._DMapEvents_TilesLoadedEvent e)
{
if (e.key == "SnapKey")
{
MapWinGIS.Extents ext;
ext = ((AxMapWinGIS.AxMap)sender).Extents;
MapWinGIS.Image pic = ((AxMapWinGIS.AxMap)sender).SnapShot3(ext.xMin, ext.xMax, ext.yMin, ext.yMax, 700);
pic.Save("map.jpg", true, MapWinGIS.ImageType.JPEG_FILE);
}
}