Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Base map Not show in Geomoose 2.9 But OSM can show. #168

Closed
Treechai4407 opened this issue Sep 26, 2018 · 14 comments
Closed

Google Base map Not show in Geomoose 2.9 But OSM can show. #168

Treechai4407 opened this issue Sep 26, 2018 · 14 comments

Comments

@Treechai4407
Copy link

I have developed Geomoose 2.9 projects in 2 Servers. As http://103.210.152.21:8708/geomoose2/ and http://marinegiscenter.dmcr.go.th/gis/ and I have a problem that google satellite, Google street and Google physical base map didn't show. While Open street map can show.

I have testing in geomoose 2.9 demo website annd found same problem. How can I fixing this problem?

Best Regard,

Treechai

@klassenjs
Copy link
Member

How you can fix the problem: Find another source for your basemaps.

Without getting into details, Google appears to have stopped supporting accessing their maps from third party mapping tools like GeoMoose/OpenLayers. There isn't anything we can do to restore access to their maps from within GeoMoose (without violating their terms of service). Note: GeoMoose 3 omitted including Google maps support for this reason.

The only action I could see that we could potentially do is remove the Google layers from the 2.9 demo. Although, due to the necessary library components necessary to run GeoMoose 2.9 being too old to work on current Linux distributions (roughly Ubuntu 16.04 and newer), we are getting very close to needing to remove the 2.9 demo altogether (April 2019, when Ubuntu 14.04 is no longer supported, is the hard deadline).

@tchaddad
Copy link
Contributor

I agress getting off Google is the solution, although for many places, it is the best available imagery.

We started getting these reports from 2.9 folks yesterday as well.

I think it may be an OpenLayers issue, as the Google API is successfully loading, and a single tile in the center of the map is successfully called, returned, but not loaded, and then no other tiles are fetched.

The odd thing is that folks using ancient GeoMoose 2.6 are not having this problem, so whatever Google has done is not impacting the super-old installs.

Just wanted to add what we've noticed.

@theduckylittle
Copy link
Member

GeoMoose 2.6.1 is using Google Maps 3.6 and OpenLayers 2.12.

GeoMoose 2.9-master is using Google Maps 3.6 and OpenLayers 2.13.

In fact, 2.6 and 2.9 are including the Google Maps API with the EXACT same URL call. I suspect the differences are between 2.12 and 2.13 versions of OpenLayers. Both of which are old enough that I'll be honest, I don't remember what the changelog looks like for them.

@klassenjs
Copy link
Member

Looks like GeoMoose 2.6.0 and 2.6.1 used OpenLayers 2.11.

OpenLayers diff (look for Layer/Google.js): https://github.com/openlayers/ol2/compare/38813af5..f4a409081#diff-cf9b8e3729bd2f0e869e7c66dca31180

Whatever the functional difference, it isn't jumping out at me.

It also looks like there has been changes since we last updated OL in 2013.

@theduckylittle
Copy link
Member

Has anyone tested the difference between having and not having an API key in the <script> tag?

@Treechai4407
Copy link
Author

Thank you very much for every suggestions. Now I trying to migrate project to Geomoose 2.6 to testing openlayer and will describe result soon.

Thannk you again.

Treechai

@tchaddad
Copy link
Contributor

Yes - I tested having an API key, and having none. I also tested from a server with https and a server without. Neither of those seemed to be the variable that made the difference.

@Treechai4407
Copy link
Author

Hello

I have solved this problem by copy OpenLayers.js (geomoose version 2.6) from
folder geomoose2.6/htdocs/build/ and then paste to folder geomoose2.9/htdocs/build.

All Google base maps were show completely.

But some openlayer functions didn't work for example print layout. I am trying to fixed this problem and will reply soon.

Thank you for every suggestions.

Treechai

@Treechai4407
Copy link
Author

Has anyone tested the difference between having and not having an API key in the <script> tag?

I have changed API key to bill able key but it still not show google base map.
However, I copy OpenLayer.js from Geomoose 2.6 to Geomoose2.9 folder and it worked.
I will test every functions and reply result soon.

Thank you very much.

@Treechai4407
Copy link
Author

GeoMoose 2.6.1 is using Google Maps 3.6 and OpenLayers 2.12.

GeoMoose 2.9-master is using Google Maps 3.6 and OpenLayers 2.13.

In fact, 2.6 and 2.9 are including the Google Maps API with the EXACT same URL call. I suspect the differences are between 2.12 and 2.13 versions of OpenLayers. Both of which are old enough that I'll be honest, I don't remember what the changelog looks like for them.

I have tested to using Openlayers2.12 by paste only OpenLayers.js from Geomoose2.6 to Geomoose2.9 and Google base maps are show complete. But I should to full testing every function again.

Thank you very much.

@tchaddad
Copy link
Contributor

tchaddad commented Sep 27, 2018

I can also confirm that rolling back the OL version does seem to resolve the problem in 2.9.x

+++++++++++++++

Random additional information - this page summarizes changes in OpenLayers 2.13 and might be helpful, FYI: https://github.com/openlayers/ol2/blob/master/notes/2.13.md

@biancoluca
Copy link

biancoluca commented Nov 28, 2018

Today also version 2.6 stop working, any other suggestion?

ERROR: window.Map is not a constructor

@Treechai4407
Copy link
Author

Treechai4407 commented Nov 28, 2018 via email

@theduckylittle
Copy link
Member

Folks, this isn't likely to work any longer due to google's stance on use of their data in other applications.

This is section 3.2.4, part part d:

(d) No Use With Non-Google Maps. Customer will not use the Google Maps Core Services in a Customer Application that contains a non-Google map. For example, Customer will not (i) display Places listings on a non-Google map, or (ii) display Street View imagery and non-Google maps in the same Customer Application.

Link here: https://cloud.google.com/maps-platform/terms/

I'm sorry about the loss of Google Maps' functionality but this is outside the scope of the project and I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants