I wonder know if the last version of Openlayers (v4.0.1) supports Google Maps as a Tile Layer. I can\'t find any documention about this. If Openlayers doesn\'t support Google Ma
For the Google's satellite data you can go with TileImage source, specifying pattern url's:
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileImage({url: 'http://khm0.googleapis.com/kh?v=717&hl=pl&&x={x}&y={y}&z={z}'})
})
],
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([19.2, 52]),
zoom: 6
})
});
EDIT: For the Google's plain map data you can go with TileImage source, specifying pattern url's for the parts of pb argument:
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.TileImage({url: 'http://maps.google.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i375060738!3m9!2spl!3sUS!5e18!12m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e0'})
})
],
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([19.2, 52]),
zoom: 6
})
});