Using map from tile providers are common use-case in web mapping: overlaying internally-hosted WMS/WFS layer on top of Google Maps/OSM/Bing Maps. These are easy in OpenLayers 2. However, this feat -especially Google Maps- is not supported anymore in OL3.
The book "OpenLayers 3 Beginner's Guide" page 107:
Why this decision?
One of the main goals of OpenLayers 3 was to rewrite OpenLayers 2, making its API cleaner. The support for Google Maps API in OpenLayers 2 has also put a significant maintenance burden on both library and application developers, to keep up with changes of the Google Maps API. To avoid this in OpenLayers 3, the support for Google Maps using Google Maps API is nonexistent. However, Google does provide its tiles independent from their API, but only to paying customers. Fortunately, you have more alternatives to Google Maps API (Bing, OSM).
Can anyone elaborate more on:
- how OL3 can access Google Maps tile independent from their API ?
- what sort of payment/contract ? Is it the same with the Google Maps API Premium ?
=================== added 6 June 2017 ==============
I found this awesome solution in OpenLayers. I tried it myself that it works with OpenLayers 4.1.1 and Leaflet 0.7.7.
Now i was wondering if this solution is the answer of my question #1 ?