dcsimg
Results 1 to 11 of 11

Thread: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image

  1. #1

    Thread Starter
    Member
    Join Date
    May 2012
    Location
    La Plata, Buenos Aires, Argentina
    Posts
    52

    Resolved [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&center=" & 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.

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    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

  3. #3
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    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.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,322

    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

  5. #5

    Thread Starter
    Member
    Join Date
    May 2012
    Location
    La Plata, Buenos Aires, Argentina
    Posts
    52

    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?

  6. #6
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,322

    Re: VB6 + WebBrowser + GoogleMaps: It tries to download the image

    Quote Originally Posted by IHappenToBe' View Post
    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.

  7. #7
    New Member
    Join Date
    May 2015
    Posts
    1

    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 !!!

  8. #8
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,322

    Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image

    Quote Originally Posted by Erkin View Post
    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

  9. #9
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,073

    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.

  10. #10
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,322

    Re: [RESOLVED] VB6 + WebBrowser + GoogleMaps: It tries to download the image

    Quote Originally Posted by jmsrickland View Post
    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

  11. #11
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,073

    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.

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
  •  



Featured


Click Here to Expand Forum to Full Width