cancel
Showing results for 
Search instead for 
Did you mean: 

pbGMap Demo - Where to go from here?

Former Member
0 Kudos

Greetings All,

I have a modified version of pbGMap that our dispatchers use to keep track of where our vehicles are and view status via color coded markers along with pop-up html windows that display detailed reservation information.  I have a thin vertical datawindow that lists all of our drivers and the user can click on anyone of them to zoom to that driver.  I have a drop down list box which allows the user to zoom to that location.  Users can also type in a reservation number to see the breadcrumb trail for the driver 30 minutes before and 30 minutes after the pick up time.  Works great.  Well at least it use to...(screenshot of user interface with error included in this post).

As Google has been enhancing their API's, this application built in 2012 no longer works.  There is a crazy long thread that describes the issue that I am having perfectly:  Issue 9004 - gmaps-api-issues - Bug: Javascript error - https://maps.googleapis.com/maps-api-v3/api/...

The map (defaultmap.htm) that is generated works fine if I simply open it in a browser.  No errors.  But none of the neat features I added are accessible.

The link above has posts that suggest that changing the call to Google maps to a different version would help.  I tried changing from v=3.8 to v=3.22, but no help.

So I have some questions about what I might do to fix it or what might be an alternative to what I have:

1) Right now all of the users are on RDP Servers with IE 8.0.  I don't know if upgrading to IE 11.0 would fix it.

2) The tool uses the built-in Microsoft Web Browser via an OLE object dropped on the window.  Does this object rely on the installed version of IE?  If not, can it be updated somehow?

3) Is there an opportunity to enhance this somehow by deploying it via Appeon?

a) I looked at the Appeon documentation and it says that OLE objects are supported, but I see no direct reference to the Microsoft Web Browser.  Is there an alternative in Appeon?

b) My application uses several web service data windows that call a PB .NET component that calls Google Maps for geocoding and routing.  The documentation says that web service data windows are supported.  But when I try to deploy the application via Appeon, I see an error as 'Failed to parse datawindow dw_geocode_address' and 'Failed to generate datawindow dw_geocode_address'.

I only know how to program in PowerBuilder, so I am hoping that someone can point me towards a solution.

Thanks all!!

Paul

PB 12.5 Classic

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The WebBrowser OLE control uses your installed IE but defaults to IE7 compatibility mode.

There is a way to override the version it uses by adding a registry setting:

https://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation

Former Member
0 Kudos

Thanks Gentlemen,

I have been working on this all day.  Seems like one step forward and two steps back.

I tried all of these settings (except for IE 10).  I had the best results with 9999, for a while, but then it seemed like after subsequent retries, a mouse over the screen caused the onion.js error.  And the map does not paint up the way it used to.  If I change position, I have to zoom in or out in order to see the map.

So we are running IE8 on our RDS servers.  I upgraded one server to IE 11.0 and again tried every possible setting.  I see to have done something wrong as I can generate the map fine, but it is not loaded under IE 8, 9 or 11.  Sigh.

I read that there might be some issues with IE not allowing ActiveX to run.  Not sure what settings to change.  I also tried including the following statements in the generated map which are supposed to tell IE that it is okay to run the scripts and content, but they do not seem to be working (Mark of the Web):

Mark of the Web (Internet Explorer)

https://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

For situations where the domain is not yet known, Internet Explorer recognizes two generic comments. The about:internetcomment specifies the Internet zone and should be formatted like this.

<!-- saved from url=(0014)about:internet -->  

The http://localhost comment specifies the Local Intranet zone and is correctly formatted like this.

<!-- saved from url=(0016)http://localhost --> 

I will keep trying...

Thanks all!!

Paul

11001 (0x2AF9Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks.
11000 (0x2AF8)IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.
9999 (0x270F)Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the declared !DOCTYPE directive. Failing todeclare a !DOCTYPE directive causes the page to load in Quirks.
9000 (0x2328)Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.

Important  In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

8888 (0x22B8)Webpages are displayed in IE8 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directivecauses the page to load in Quirks.
8000 (0x1F40)Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8

Important  In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

Former Member
0 Kudos

Also, I have questions about RegEdit...

Do I have to reboot the machine in order for the changes to take effect?  Or Do I not even have to close RegEdit for the change to take effect as there is no Save button?

Also, if I am on a 64-bit machine should I be entering the values for IE as QWord instead of DWord?

Thanks!!

Paul

Former Member
0 Kudos

I am guessing that because PowerBuilder is 32-Bit, I should be using DWord and not QWord.

Anyway, after lots of experimenting, it doesn't seem to matter which settings I used in the registry for Dword and the name of my application (which is a Winform App).

The only thing that is consistent is that I can use my dropdown list to recenter the map until the cows come home.  It's the click, double click and drag events that cause the problem with the map.

The problem is that I have no idea how of if that is managed in the application.  Seems like not.

Still, if I take the generated defaultmap.htm and open it in any browser, there is no problem at all.  I can click, double click and drag and never a problem.

Sometimes I get the onion.js error right away, sometimes it takes several minutes of clicking, double clicking and dragging to get it to happen.  At one point, I actually thought the problem had gone away and then one click later, bang!! 

Former Member
0 Kudos

After only 12 hours of complete torture, I have this running correctly now.

Here is what I had to do to get it to work:

  1. Installed IE 11.0
  2. Changed function RenderHeader to Javascript Version (v=3.24.0) in object uo_googlemap_api
  3. If running on a 64 bit machine change the registry as follows:

32 bit on 64 bit machine:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

Value Key: DWORD YourApplication.exe

 
For FTVehicleTracker4.exe the only value that worked was 2af9 (hex) or 11001 (Decimal)


Thank you, Roland, Chris and Armeen!!

Former Member
0 Kudos

Excellent news Paul and ... thanks a $1M for posting the feedback on your solution!  

Former Member
0 Kudos

To be fair, the kudos goes to Rick Strahl who posted this:

Web Browser Control – Specifying the IE Version

https://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version

By the way, Mark of The Web (MOTW) had nothing to do with it...

Paul

Former Member
0 Kudos

We've also had the onion.js error using Google maps via the IE control.  I'm unsure why it was done this way but by adding the following to the generated html in the header section it appears to have fixed the issue for us:

<meta http-equiv="X-UA-Compatible" content="IE=edge">

Laurence

Answers (1)

Answers (1)

former_member185283
Participant
0 Kudos

Appeon does support OLE and it also does support the HypertextToURL(), which will open the URL in a separate browser window.  However, I'm not sure if Appeon would solve this problem considering you have the same problem in PowerBuilder and PowerBuilder supports the same features. 

Former Member
0 Kudos

Hi Paul;

  What Armeen says makes sense ... you really need to resolve the issues in the native PB application first before trying to take it into the Appeon Web realm.

  FWIW: I have an example PB application that uses an embedded IE web browser that utilizes Google Maps via the INET object. Strangely, it also gets similar jScript errors like the one you have posted. I suspect that the problem is related to what Roland posted about IE using v7 emulation.

Regards ... Chris