ThinkGeo.com    |     Documentation    |     Premium Support

PrinterOverlay Rendering in Background Thread

When I use the MapPrinterLayer and add the SqlServerFeatureLayer(which contains too many features) to it, I saw the MainThread is Frozen until all features are rendered, I mean DrawCore is run in the MainThread.

So my question is, how can I tell the MapPrinterLayer to run DrawCore in the background thread, like what we have in Non-PrinterLayer.

Thanks Mahdi,
Do you use mapsuite 10 or 12? I think load the data from DB may block the main thread. We are looking into more details.

Thanks

Frank

I used v12.
Note that when you work with the MapView(add SqlFeatureLayer to overlay and add it to Map), we didn’t see any issue, everything is fine, but when you enable just with MapPrinterLayer, you can see the MainThread is blocked during the rendering process.

Thanks Mahdi,
I think when we load the SQLServerFeature layer it need some time. And it will block the main threading. You could put the load layer code to a threading. I created a demo for you see if that help.
WpfApp3.zip (4.5 KB)

If this is not the case you met. Could you create a small sample to re-produce this one. That will be very helpful for us look into more detail.

Thanks

Frank

I debug WpfApp3.zip (4.5 KB) over my data, As I said before, MainThread is Freeze.

Just run your test project with a table that contains thousands of features.

Thanks Mahdi,
Could you share us the database back file? We could restore to our local environment. You could drop it to dropbox and send the link to support@thinkgeo.com

Thanks

Frank