Solved

webbrowser control does not show image

Posted on 2016-10-29
9
40 Views
Last Modified: 2016-11-01
Hi -

I am using the webbrowser control to show bing maps and it works on several of my forms.

Now I need to develop a new form that is specifically used to just show the map, like a pop-up.

I am using a string as source for the map and the string looks OK and the string is:

http://bing.com/maps/embed/viewer.aspx?cp= 11.9316666666667~-15.7816666666667&lvl=19dir=90&sty=a&w=700&h=600

I try to use a normal browser and it shows, with the string, the convenient output, albeit at a much larger scale

but in the web browser control is pure white...

the control has the following code on form load event:

Private Sub Form_Load()


    ' buscar a imagem satélite do ponto
    Dim strGPSMarcacao, _
        strTextGPSCoord As String
       
    Lat = Forms![_commonVariables]![currentLat]
    Lgt = Forms![_commonVariables]![currentLgt]
    zoom = Forms![_commonVariables]![currentZoom]
   
    textGPSCoord = Str([Lat]) & "~" & Str([Lgt])
   
    strGPSMarcacao = "http://bing.com" & "/maps/embed/viewer.aspx?cp=" & [textGPSCoord] & "&lvl=" & zoom
    strGPSMarcacao = strGPSMarcacao & "dir=90&sty=a&w=700&h=600 "
    Debug.Print strGPSMarcacao

    Me.fld_InfoSatelite.Requery

End Sub

Screen-Shot-2016-10-29-at-18.43.55.png
can anyone help?
0
Comment
Question by:jirdeaid
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 250 total points
ID: 41865672
Try this code (I can't check your variables, so try with constant values, then return to variables):
Private Sub Form_Load()
Dim strGPSMarcacao, _
        strTextGPSCoord As String
Dim Lat As Double, Lgt As Double, zoom As Double
    'Lat = Forms![_commonVariables]![currentLat]
    Lat = 11.9316666666667
    
    'Lgt = Forms![_commonVariables]![currentLgt]
    Lgt = -15.7816666666667
    
    'zoom = Forms![_commonVariables]![currentZoom]
    zoom = 19
    
    strTextGPSCoord = Str([Lat]) & "~" & Str([Lgt])
    
    strGPSMarcacao = "http://bing.com/maps/embed/viewer.aspx?cp=" & strTextGPSCoord & "&lvl=" & zoom
    strGPSMarcacao = strGPSMarcacao & "dir=90&sty=a&w=700&h=600 "
    Debug.Print strGPSMarcacao

    Me.fld_InfoSatelite.ControlSource = "=" & Chr(34) & strGPSMarcacao & Chr(34)
    Me.fld_InfoSatelite.Requery

End Sub

Open in new window

0
 
LVL 33

Expert Comment

by:ste5an
ID: 41865830
Call Navigate:

fld_InfoSatelite.Navigate strGPSMarcacao

Open in new window

0
 

Author Comment

by:jirdeaid
ID: 41866003
Hi Thanks!
to  ste5san -- I can't understand... there is no Navigate method for the object :(
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 41866058
Have been down this road before...took me hours and hours to find the solution.

It's the compatibility mode setting on the web browser control.   It emulates IE 7 by default, which won't display Bing maps.

 Note that Bing showing up as a white page can happen on a normal station to, and for a reason besides this (bug in a registry entry for the cache settings - solution for that is here https://www.experts-exchange.com/questions/28918929/Bing-maps-only-works-if-in-private-browsing-enabled.html#a41443561 ).

The best registry key to set this with is:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

as this doesn't require admin rights, but you can set it on the local machine key as well.

 Under that Key, enter a DWORD key of MSACCESS.EXE and set the value to 0x00002711 (10001)

 You also might want to consider switching to Google Maps.

Jim.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:jirdeaid
ID: 41866171
thanks jim!
0
 
LVL 39

Expert Comment

by:als315
ID: 41867451
@jirdeaid: Do you need more help or it is time to close question?
0
 

Author Comment

by:jirdeaid
ID: 41868301
well - I THOUGHT it was close. But I can't find a close button as in the good old days....
0
 
LVL 57
ID: 41868369
<<well - I THOUGHT it was close. But I can't find a close button as in the good old days....>>

 They moved it to the bottom left.   No one finds it down there.   :(

Jim.
0
 

Author Comment

by:jirdeaid
ID: 41868404
these ideas made to confuse me....
I am closing now!
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now