GMap.Net .ToImage() Function Outputting Images With Blank Tiles
up vote
0
down vote
favorite
The .ToImage()
function in GMap.Net does not appear to wait for the map data to be downloaded before the screenshot is taken. This results in images with blank tiles. Is there any existing capability that would allow GMaps to wait until the map is loaded?
I already posted my question on GitHub but haven't gotten a response so far. So any help is appreciated.
VB.NET Code
Private Function TakeBitmapScreenShot() As Image
'''''''''''''''''''''''''''''''''''''''''
'Code to wait until all tiles have loaded
'''''''''''''''''''''''''''''''''''''''''
Return GMapControl.ToImage()
End Function
gmap.net
add a comment |
up vote
0
down vote
favorite
The .ToImage()
function in GMap.Net does not appear to wait for the map data to be downloaded before the screenshot is taken. This results in images with blank tiles. Is there any existing capability that would allow GMaps to wait until the map is loaded?
I already posted my question on GitHub but haven't gotten a response so far. So any help is appreciated.
VB.NET Code
Private Function TakeBitmapScreenShot() As Image
'''''''''''''''''''''''''''''''''''''''''
'Code to wait until all tiles have loaded
'''''''''''''''''''''''''''''''''''''''''
Return GMapControl.ToImage()
End Function
gmap.net
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The .ToImage()
function in GMap.Net does not appear to wait for the map data to be downloaded before the screenshot is taken. This results in images with blank tiles. Is there any existing capability that would allow GMaps to wait until the map is loaded?
I already posted my question on GitHub but haven't gotten a response so far. So any help is appreciated.
VB.NET Code
Private Function TakeBitmapScreenShot() As Image
'''''''''''''''''''''''''''''''''''''''''
'Code to wait until all tiles have loaded
'''''''''''''''''''''''''''''''''''''''''
Return GMapControl.ToImage()
End Function
gmap.net
The .ToImage()
function in GMap.Net does not appear to wait for the map data to be downloaded before the screenshot is taken. This results in images with blank tiles. Is there any existing capability that would allow GMaps to wait until the map is loaded?
I already posted my question on GitHub but haven't gotten a response so far. So any help is appreciated.
VB.NET Code
Private Function TakeBitmapScreenShot() As Image
'''''''''''''''''''''''''''''''''''''''''
'Code to wait until all tiles have loaded
'''''''''''''''''''''''''''''''''''''''''
Return GMapControl.ToImage()
End Function
gmap.net
gmap.net
asked Nov 9 at 2:23
Joseph
938
938
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
Two of the ways around this are using the TilePrefetcher or even better this code.
add a comment |
up vote
0
down vote
You can Handle the event (OnTileLoadComplete ) which fires when the tile images completly loaded and then you can take the screenshot
GMapControl1.OnTileLoadComplete += GMapControl1_OnTileLoadComplete;
private void GMapControl1_OnTileLoadComplete(long ElapsedMilliseconds)
GMapControl.ToImage();
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Two of the ways around this are using the TilePrefetcher or even better this code.
add a comment |
up vote
0
down vote
accepted
Two of the ways around this are using the TilePrefetcher or even better this code.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Two of the ways around this are using the TilePrefetcher or even better this code.
Two of the ways around this are using the TilePrefetcher or even better this code.
answered Nov 12 at 4:47
Joseph
938
938
add a comment |
add a comment |
up vote
0
down vote
You can Handle the event (OnTileLoadComplete ) which fires when the tile images completly loaded and then you can take the screenshot
GMapControl1.OnTileLoadComplete += GMapControl1_OnTileLoadComplete;
private void GMapControl1_OnTileLoadComplete(long ElapsedMilliseconds)
GMapControl.ToImage();
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
add a comment |
up vote
0
down vote
You can Handle the event (OnTileLoadComplete ) which fires when the tile images completly loaded and then you can take the screenshot
GMapControl1.OnTileLoadComplete += GMapControl1_OnTileLoadComplete;
private void GMapControl1_OnTileLoadComplete(long ElapsedMilliseconds)
GMapControl.ToImage();
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
add a comment |
up vote
0
down vote
up vote
0
down vote
You can Handle the event (OnTileLoadComplete ) which fires when the tile images completly loaded and then you can take the screenshot
GMapControl1.OnTileLoadComplete += GMapControl1_OnTileLoadComplete;
private void GMapControl1_OnTileLoadComplete(long ElapsedMilliseconds)
GMapControl.ToImage();
You can Handle the event (OnTileLoadComplete ) which fires when the tile images completly loaded and then you can take the screenshot
GMapControl1.OnTileLoadComplete += GMapControl1_OnTileLoadComplete;
private void GMapControl1_OnTileLoadComplete(long ElapsedMilliseconds)
GMapControl.ToImage();
answered Nov 12 at 7:55
Ahmed GIS
32827
32827
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
add a comment |
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
Thanks, I tried that but it wasn't always working for some reason.
– Joseph
Nov 12 at 8:03
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53218962%2fgmap-net-toimage-function-outputting-images-with-blank-tiles%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown