GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Staff
Posts: 139
Registered: ‎05-31-2016
Accepted Solution

Google Street View Plugin problems

[ Edited ]

This is my second plugin. I have this one working http://community.hexagongeospatial.com/t5/Shared-Samples/Third-Party-Integration/ta-p/2129

Now I would like to get the Google Street view plugin Sample working because it is needed for a few projects.

http://community.hexagongeospatial.com/t5/Shared-Samples/Google-Street-View-Plugin/ta-p/8

 

But I am having a few problems getting it to work

I have 2 main issues.

It does not display properly and I am getting exceptions thrown when I pan/zoom in either window.

I would like to start by getting it to display properly before I move onto working out what is causing the exceptions.

This is what I see when I open Street View within Smartclient

 

Capture.PNG

I am using a "Browse" Base Action added to the MAPCONTEXT tab with the url set to my html page "http://localhost/GoogleStreetView/HGDNGMSCStreetview.html".

 

With a static Street View page (no Smartclient javascript) using the "Browse" Base Action I get the same broken view.

But If I load that same Static page using "BrowseInNativeBrowser" it displays. Unfortunatley I get a blank page when I use a page waiting for the OnSmartclientReady event. My guess is the OnSmartClientReady event never fires.

 

Has someone seen this problem before or do you know what I am doing wrong?

Let me know if you need more information (logs etc)

Hope someone can help.

 

Regards,

Phil

 

Staff
Posts: 1,134
Registered: ‎10-18-2015

Re: Google Street View Plugin problems

Hi Phil,

 

many people have already implemented that plugin, so it should be working fine. Please debug it to see what is going on. Which GMSC version are you using?

 

Regards,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Staff
Posts: 139
Registered: ‎05-31-2016

Re: Google Street View Plugin problems

I am using the 2016 version.

Have you seen it working in 2016 GMSC?

Super Contributor
Posts: 455
Registered: ‎10-12-2015

Re: Google Street View Plugin problems

That google street view display is what we got when the Google API key was not populated - check you have a valid google api key in place.

(Google api key used to be optional - google recently made it mandatory)

Staff
Posts: 139
Registered: ‎05-31-2016

Re: Google Street View Plugin problems

I am using the API Key, does this look right?

 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>HGDN GMSC Google Street View</title>
    <style>
        html, body, #pano {height: 100%;  margin: 0px;  padding: 0px;  }
    </style>  
 <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> 
 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyA41fNBXcy6wL5qR8tXv_kY6qRK0kE1XXX"></script>
 
   <script>

 

I am not sure I am starting Google Street View the right way.

When I start it using Browse base action I get the broken display

When I start it using BrowseInNativeBrowser base action it displays properly but the onSmartClientReady event never fires.

 

Staff
Posts: 1,134
Registered: ‎10-18-2015

Re: Google Street View Plugin problems

The behavior with browseInNativeBrowser() action is expected because you are out of the Java context, so you cannot have the same communication you have within Java with the integrated browser. 

 

I guess something has changed in the StreetView API because I just checked a known implementation based on GMSC 2015 (perfectly working until few months ago), that is having the same issues you described. You should try to investigate in that direction.

 

Regards,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Staff
Posts: 139
Registered: ‎05-31-2016

Re: Google Street View Plugin problems

I didnt expect BrowseInNativeBrowser to work, but didnt see that information anywhere in the sample. Thanks for the confirming that for me.

 

 

I have managed to get it to display something by setting the google API to version 3.0

 

Capture.PNG

 

Just need to figure out what is causing the null pointer exception now.

 

Super Contributor
Posts: 285
Registered: ‎02-09-2016

Re: Google Street View Plugin problems

Hi all,

 

I am set the Google API version to be 3.5 I also experience null pointer occasionally, currently monitoring it.

 

Kind regards,  

Staff
Posts: 139
Registered: ‎05-31-2016

Re: Google Street View Plugin problems

I have the StreetView Plugin working now.

 

The last problem was a caused by a coordinate conversion rounding problem between Latitude, Longitude to project Easting, Northings. This was making it go into a continuous loop of updating the Location in Smartclient and the Street View location.

 

I patched it by comparing the coordinates between the 2 views and only change the location of the Street View if the Easting, Northings of the 2 views have changed (ignoring everything after the decimal point). This probably won’t work for all coordinate systems, so it will probably need to be changed. But it works for now :-)

 

Regular Contributor
Posts: 191
Registered: ‎11-17-2015

Re: Google Street View Plugin problems

Hello,

 

We have the same problem with the GoogleStreetView 2016. It used to work some month ago.

I have checked if there was a loop between GMSC and the GoogleStreetView page. There is no problem.

 

In the log file I have the following everytime I move in the map:

Oct 14, 2016 4:30:50 PM FINEST: Browse url: http://62.161.186.181/GoogleStreetView/StreetView.html?lat=48.127943&lng=-1.639884 --> [AWT-EventQueue-2] com.intergraph.web.plugin.media.MediaSupportPlugin.processBrowseAction
Oct 14, 2016 4:30:50 PM FINEST: http://62.161.186.181/GoogleStreetView/StreetView.html?lat=48.127943&lng=-1.639884 --> [JavaFX Application Thread] com.intergraph.web.plugin.webbrowser.WebBrowser$1$8.changed
Oct 14, 2016 4:30:50 PM FINEST: null --> [JavaFX Application Thread] com.intergraph.web.plugin.webbrowser.WebBrowser$1$9.changed
Oct 14, 2016 4:30:50 PM FINEST: Google Street View --> [JavaFX Application Thread] com.intergraph.web.plugin.webbrowser.WebBrowser$1$9.changed

 

Related to the null reference?

 

The html page works outside GMSC context.

 

Any idea?

 

Thank you.

Yohann.