# LoadTilesForSnapshot

**URL:** <https://mapwindow.discourse.group/t/loadtilesforsnapshot/987>\
**Category:** MapWinGIS\
**Created:** [May 7, 2021, 1:00pm UTC](https://mapwindow.discourse.group/t/loadtilesforsnapshot/987 "2021-05-07T13:00:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bouvin87](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Bouvin87](https://mapwindow.discourse.group/u/Bouvin87)\
**Post date:** [May 7, 2021, 1:00pm UTC](https://mapwindow.discourse.group/t/loadtilesforsnapshot/987/1 "2021-05-07T13:00:41Z")

</div>

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);
        }
    }
```

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 10, 2022, 2:53pm UTC](https://mapwindow.discourse.group/t/loadtilesforsnapshot/987/2 "2022-01-10T14:53:24Z")

</div>

Sorry for the late reply.

Can you check if this is still a problem in the latest version of MapWinGIS?
