0

This question already has an answer here:

Recently, I immigrated to the OpenLayers 4 and I've just wondered if there is any 3rd-party or plugins in order to add Google Maps layers such as Satellite, Hybrid and etc in my project. How should I achieve this?

Why isn't it support anymore?

Edit:

I see the below link in StackExchange. Someone says that we can use leaflet instead of OpenLayers, which isn't my goal and someone else introduced the ol3-google-maps plugin which integrated Google Maps into the OL3. but it's named OL3 and I confused about it. Can I use it with OpenLayers 4 and is it compatible well?

Openlayers v4.0.1 support Google Maps Javascript API?

marked as duplicate by BradHards, tinlyx, PolyGeo Aug 20 '17 at 6:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Why do you need a plugin? Do you want to use google maps only basemap? – Ömür Bilgili Oct 27 '17 at 12:22
  • @ÖmürBilgili Hi, I should migrate to the new OL (OpenLayers 4) and unfortunately there isn't support for the Google layers in the new OL anymore. My current project has been written by OL2. Anyway, I'd like to add the Google Sattelite and Hybrid layer as the base layer with OL 4 based application. – Ahmad Payan Oct 27 '17 at 15:06
  • Ok, I get it, I worked on same situations, Our project migrated Ol2 to Ol4. I solved like this. gis.stackexchange.com/a/253183/103570 – Ömür Bilgili Oct 27 '17 at 15:26
  • @ÖmürBilgili. Your answer has been very helpful. Thanks! I will give it a try. – Ahmad Payan Oct 27 '17 at 15:54