[OpenLayers-Users] BaseMap Definition in GeoExplorer with Openlayers

ELKHATTABI Imane imanekhtb at gmail.com
Fri May 15 03:57:03 PDT 2015


Hello everyone,

I'd like to know how to define 'Open Street Map' as basemap in the function
GeoExplorer.js . The createLayout function is defined as :

createLayout:function(){
this.map=new OpenLayers.Map({
....
});
 layers: [
 //=========base layer
 new OpenLayers.Layer.WMS(
"Global Imagery (vmap) [Online]",
"http://labs.metacarta.com/wms/vmap0",
{
layers: "basic",
transparent: "true",
format: "image/png"
},
{isBaseLayer: true, visibility: false}
),
new OpenLayers.Layer.WMS("Global Imagery (OpenGeo) [Online]",
"http://maps.opengeo.org/geowebcache/service/wms", {
layers: "bluemarble"
},{
//buffer: 0,
isBaseLayer: true,
visibility: false
}
)
]
});


Instead of 'Global Imagery' base map, I'd like to use 'OpenStreetMap' or
'Google Maps'.

Any hint or help would be highly apreciated.
Thanks in advance
ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20150515/79ae7d86/attachment.html>


More information about the Users mailing list