In openlayers-2 können wir Google Grundkarten hinzufügen (Satellit, physisch, hybrid, etc.). Ich muss Google Grundkarten in Openlayer-3 hinzufügen. Wie kann ich Google Grundkarten hinzufügen?Wie Sie Google Grundkarten in Openlayers-3 hinzufügen?
CODE in Openlayers-3
map = new ol.Map({
layers: [
new ol.layer.Group({
layers: [
new ol.layer.Tile({
source: null,
visible:false
}),
new ol.layer.Tile({
source: new ol.source.MapQuest({layer: 'sat'})
}),
new ol.layer.Tile({
source: new ol.source.OSM(),
visible:false
})
]})
],
target: 'map',
view: new ol.View({
center:[28.566667, 4.01666699999998],
zoom:7
}),
controls: ol.control.defaults({
attribution:false
}).extend([
scaleLineControl
]),
});
lyr=new ol.layer.Tile({ source: new ol.source.TileWMS({
url: 'http://localhost:8080/geoserver/wms',
params: {'LAYERS': 'test:test', 'TILED': true},
serverType: 'geoserver'
})
});
map.addLayer(lyr);
Ich brauche Grundkarten statt osm und mapquest an Google.
[Was haben Sie bisher versucht?] (Http://whathaveyoutried.com) Bitte [zeigen Sie uns Ihren Code] (http://stackoverflow.com/help/mcve). – GoBusto