-
Mar 24th, 2014, 09:25 PM
#1
Thread Starter
Member
[RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
In most of computers (mine included), a WebBrowser where I execute:
Code:
WebBrowser1.Navigate "http://maps.googleapis.com/maps/api/staticmap?&size=125x125¢er=" & AdressAndSomeOtherParameters
shows the map correctly.
BUT, in a few other PC, it tries to download de image (staticmaps.jpg) instead of showing it.
I have not a screenshot because it doesn't happen to me, just to some clients.
In one ocasion, it was solved changing the default browser from IE to Google Chrome, but in other case I couldn't to that. Besides, it's not correct to go changing client's browser preferences.
Any idea why?
Thanks in advance.
-
Mar 25th, 2014, 02:43 AM
#2
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
I think it has something to do with in the internet setting on the target computer.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Mar 25th, 2014, 10:58 AM
#3
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
I'm sure its the IE/WebBrowser Emulator key in the registry that has to be changed to a different (possibly higher) version.
-
Mar 25th, 2014, 08:32 PM
#4
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
There's also the possibility, to avoid the IE-Control entirely (in case it is only the Google-Maps-Static-API the Webbrowser-Component is currently addressing).
Below is an implementation, which doesn't use any external Lib or Component - just the plain AsyncDownload-functionality of the VB-UserControl
(which also supports the hand-out of downloaded WebImage-resources as a VB-StdPicture).
http://www.vbRichClient.com/Download...StaticDemo.zip
Olaf
-
Mar 26th, 2014, 01:39 AM
#5
Thread Starter
Member
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
Wow, Olaf... I'm speechless! Your control is so simple and powerful!
I've been trying to use dinamic maps with VB6 for the last whole year and I just couldn't make it work, and I've found A LOT of people who told me it was impossible.
Your control uses Static maps but with the functionallity of dinamics... And I loved the fact that the mousewheel is simply achieved by setting the focus to a combobox. It doesn't use webbrowser, and I think it gets rid of the clicking sound of IE, you can add markers... CONGRATULATIONS, really!
The only thing I'm going to change to it is the direction of mousewheel (it's reversed, wheel down usually zooms out and wheel up usually zooms in), and maybe a busy mouseicon while refreshing.
Thank you to NightWalker and Max187Boucher too, for helping me with the actual problem I was having.
Olaf, May I add this control to my software, giving you credit in the "About" screen for it?
-
Mar 26th, 2014, 11:00 AM
#6
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by IHappenToBe'
May I add this control to my software, giving you credit in the "About" screen for it?
Sure - when there's no explicit license-clause in the header of Source-Modules, then they are
usually free to use in any way one chooses - at least that's what I consider common practise
in the community (and in forums or newsgroups) so far ...
(the only "rule" in such cases perhaps, that you keep the info who has originally written it,
to be able to provide it when you repost snippets or demos into public areas again).
No need for crediting me in "About" - but if you feel better when you do -
then by all means go ahead - but in bold-letters then, OK?
Olaf
Last edited by Schmidt; Mar 26th, 2014 at 11:04 AM.
-
May 31st, 2015, 12:18 PM
#7
New Member
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Dear Olaf , I got acquainted with your work , and she was very helpful in educational purposes . I was wondering how to use your ocx insert a marker in their LatLon without DblClickMouse. Many thanks for your example !!!
-
May 31st, 2015, 12:41 PM
#8
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by Erkin
Dear Olaf , I got acquainted with your work , and she was very helpful in educational purposes . I was wondering how to use your ocx insert a marker in their LatLon without DblClickMouse. Many thanks for your example !!!
A small enhancement for that was described in this thread here:
http://www.vbforums.com/showthread.p...lem!&p=4875325
The enhancement then capable to draw a Poly-Line between "externally given Lat/Lon Coord-points".
Instead of Drawing the Poly-Line you could simply adapt the Drawings to place
your own "Marker-Icons" on top of the current Map-Image (at the Lat/Lon-Coords given)...
Olaf
-
May 31st, 2015, 06:17 PM
#9
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Oops!
It doesn't work anymore. Everything was alright for awhile then nothing. The map disappeared and nothing from that time on. I closed the project and restarted it but nothing happens - no map just a empty Form where the map should be. Maybe it has to do with the AsyncDownload. I'm not disconnected from the Net so I don't think it's me
EDIT:
Ok, here it is 2 hours later and I restarted the project and it was OK. I played around with it for awhile and kaboom it went blank again
Last edited by jmsrickland; May 31st, 2015 at 08:20 PM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jun 1st, 2015, 05:59 AM
#10
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by jmsrickland
Oops!
It doesn't work anymore. Everything was alright for awhile then nothing. The map disappeared and nothing from that time on. I closed the project and restarted it but nothing happens - no map just a empty Form where the map should be. Maybe it has to do with the AsyncDownload. I'm not disconnected from the Net so I don't think it's me
EDIT:
Ok, here it is 2 hours later and I restarted the project and it was OK. I played around with it for awhile and kaboom it went blank again
Did you read, what the current limits are for Googles "Static Maps API" (for the "anonymous" user)?
IIRC, they have increased the amount of available "requests per day" to a decent number now,
but there could be additional restrictions with "requests per hour" or "requests per minute".
Olaf
-
Jun 1st, 2015, 10:31 AM
#11
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Yeah, I kind of thought it might be Google putting the clamps on me although I didn't know about any "request per day" it just seemed logical. I was tinkering around with your code trying to make the map move as the mouse moves this way and that way and while I did get it to work it would jam up after so many moves. The last time this happened I had to wait several hours before I could get more maps.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jun 11th, 2021, 10:23 AM
#12
New Member
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
I know this post is very old, but I would like to take advantage of the tool they designed, only that the link is no longer available, there is someone who can share it with me and tell me if it is still functional, it would be of great help, greetings
-
Jun 11th, 2021, 12:46 PM
#13
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by tmsgln
I know this post is very old, but I would like to take advantage of the tool they designed, only that the link is no longer available
The link still works for me? What error code are you seeing?
-
Jun 11th, 2021, 05:01 PM
#14
New Member
Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by jpbro
The link still works for me? What error code are you seeing?
the download link is not active or shows it blank, the example project is no longer available, thank you for your attention
http://www.vbrichclient.com/Download...StaticDemo.zip
-
Dec 24th, 2021, 03:20 AM
#15
Lively Member
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
Olaf:
Hello The link has expired and cannot be downloaded
http://www.vbrichclient.com/Download...StaticDemo.zip
-
Dec 24th, 2021, 03:52 AM
#16
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by smileyoufu
Still works for me here...
Are you trying to reach this download-URL from China perhaps?
Then say thank you to your "big firewall"...
(which probably detects some Strings which match "Google" inside the zip-content,
or takes offense with the "GMap", or "GMapStatic" string contained in the URL).
Besides, the times where everyone was able to make 2000 free requests per day against this StaticMap-API are over.
Now you have to get a developer-Key - and have to pay for its usage...
Edit: You might want to try, to copy the Link-URL (as Text) into a new Browser-Tab first -
... and then replace the protocol-prefix: http:// with https://
Olaf
Last edited by Schmidt; Dec 24th, 2021 at 07:10 AM.
-
Jan 11th, 2022, 08:08 AM
#17
Lively Member
Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image
Originally Posted by Schmidt
Still works for me here...
Are you trying to reach this download-URL from China perhaps?
Then say thank you to your "big firewall"...
(which probably detects some Strings which match "Google" inside the zip-content,
or takes offense with the "GMap", or "GMapStatic" string contained in the URL).
Besides, the times where everyone was able to make 2000 free requests per day against this StaticMap-API are over.
Now you have to get a developer-Key - and have to pay for its usage...
Edit: You might want to try, to copy the Link-URL (as Text) into a new Browser-Tab first -
... and then replace the protocol-prefix: http:// with https://
Olaf
Thank you so much!
https://www.vbrichclient.com/Downloa...StaticDemo.zip OK,file can be downloaded normally
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|