Google Maps Sample

Hi,
I tried the google maps sample and everything is working good so far.

But when I install it on a server and try to connect like www.sample.de:8080/app it also works but the icons/pictures on the map will not be displayed. Only when I tunnel port 8080 from my pc to the server.

Server is running on Ubuntu 16.04 64 bit.

Thanks a lot.

Regards
Torsten

Hi,

Could you share a sample of your code where you add your icons/pictures to the MapViewer?

Hi,

I just downloaded the Sample “Goole Maps” from the Sample Projects.

When I run it on my local computer it works fine. But when I start it on a remote server and call it like

http://sampleserver.de:8080/app , the app is working fine, but no Icons in the map will be displayed.

Hope that helps.

It is a normal behaviour for this sample.

If you open https://github.com/cuba-platform/sample-google-map/blob/master/modules/web/src/com/company/sample/web/screens/map/MapScreen.java#L96 then you will see call of GlobalConfig.getDispatcherBaseUrl(), this URL must be properly configured on production if you want to use it.

Usually we recommend to set cuba.webAppUrl ,cuba.webHostName, cuba.webPort and cuba.webContextName (see the list of common properties here: https://doc.cuba-platform.com/manual-6.4/app_properties_reference.html)

This behaviour is applicable only for this sample, not to the Map itself. If you want to set up your server with this sample properly - set these properties: cuba.webAppUrl ,cuba.webHostName, cuba.webPort and cuba.webContextName according to your server parameters.

YES. Thank you so much.