Solved

webbrowser control does not show image

Posted on 2016-10-29
9
47 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
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.

 
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
 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

803 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