heron-mc / heron-mc

Heron Mapping Client (formerly geoext-viewer on Google Code)
http://heron-mc.org
GNU General Public License v3.0
31 stars 28 forks source link

Problem with GoogleMaps and OL 2 #480

Open rmarzocchi84 opened 6 years ago

rmarzocchi84 commented 6 years ago

Anyone have idea how to solve the problem related to the new Google Cloud API Policy. I activated the API key but I do not know how to use it using OL2

http://lib.heron-mc.org/heron/1.0.6/examples/googlemaps/index.html

justb4 commented 6 years ago

At least there was an (unrelated) problem with loading the overlay WMS "cities Layer. That is fixed in latest/master version, so example link becomes:

http://lib.heron-mc.org/heron/latest/examples/googlemaps/

The main issue here is that Google has changed its policies since a month or so, see: https://developers.google.com/maps/faq

So one would need not just an API key, but this key needs to be coupled to billing. So a generic example is IMHO not really possible without modification in OpenLayers v2. I will see what is possible, e.g. overriding OL2 code with possibility adding API keys, but the general advise is to find alternatives for Google Maps.