-1

I have tried to use ol3-google-maps with Openlayers v4.6.5 by changing the example from http://mapgears.github.io/ol3-google-maps/ to import the script source for this version in the page, but nothing is displayed and no errors are logged to the console. It seems that maybe ol3gm.js already includes the OLv3 code. Is OLv4 not supported at all? Why? Are there any plans to support it the future or some workarounds I could try?

Thanks, Joao

JoaoLJr
  • 13
  • 3

1 Answers1

1

ol3-google-maps already includes OpenLayers, as explained in the README, under the Quick start section:

... load the OL3-Google-Maps script included in the tarball of the version you downloaded, which already includes OpenLayers so you don't need to load OpenLayers too

So, you don't need to load it again.

The version of OpenLayers included depends on the version of ol3-google-maps. To know what OL version is used, please see the ol3-google-maps releases.

Alexandre Dubé
  • 2,769
  • 1
  • 18
  • 30
  • Ok, I see. So, if I go to the release page above and download the source for OL3-Google-Maps v0.20.0, the package.json file contains "openlayers: 4.6.5" under "devDependencies". Is that the OL version included? If yes, I guess I was really thown off by the "ol3" prefix in the project name... – JoaoLJr Jun 06 '18 at 16:24
  • That's correct. Back when it was made, OpenLayers itself was called 'ol3'. It was renamed to 'ol'. ol3-google-maps wasn't. – Alexandre Dubé Jun 06 '18 at 17:52