I am unable to export an image from the map control that is off screen using a local map provider. I would like to able to control the size and the zoom of the map image exported in order to make sure custom layers are included.
I have attached a project that has a form with two buttons and the offline map tiles.
- Upon loading the form, a map control is added to the form. The map control uses open street map as a provider. A polygon drawn on a vector layer using WKT. This is to demonstrate that the offline maps are being rendered.
- The Online button instantiates a off screen map control. This map control uses open street map as a provider. A polygon drawn on a vector layer using WKT. The image is exported when the layer's data has complete.
- The Offline button: instantiates a off screen map control. This map control uses map image tiles locally as a provider. A polygon drawn on a vector layer using WKT. The image is exported when the layer's data has complete.
When I attempt to export the image using map image tiles locally the map control does not behave as expected.
- If I remove the setting of the map control's size (e.g. 640 x 480) an image is generated but the map is rendered in its default size (400 x 200)… Anything outside bounds of the default size will not render an image.
- If I change the zoom level from 17 to 15 the I am unable to export an image.
Any suggestions?
Thanks
Justin
Thank you for your report. I have managed to replicate the problem on my side. It will require additional time to research the problem in greater detail. Please bear with us. We will update the thread once we have any results.