[Users] BaseMap Definition in GeoExplorer
ELKHATTABI Imane
imanekhtb at gmail.com
Sat May 16 01:59:22 CEST 2015
Thank you so much Chris for replying.
These samples work fine with my wms layer.
However, I'm using GeoExlporer.js that creates the mapLayout with the
layers and other functionalities.
Is there a way I can define a base map like OSM with this structure :
this.mapPanel=new GeoExt.MapPanel({
layout:"anchor",border:true,region:"center",
map:this.map,
center:mapConfig.center&&new
OpenLayers.LonLat(mapConfig.center[0],mapConfig.center[1]),
zoom:mapConfig.zoom,
items:[{
xtype:"gx_zoomslider",
vertical:true,height:100,
plugins:new GeoExt.ZoomSliderTip({template:"<div>Zoom
Level: {zoom}</div>"})},
this.createMapOverlay()
],
layers: [
//====base layer=====
new OpenLayers.Layer.OSM("OpenLayers"),
//=====overlays=====
new OpenLayers.Layer.WMS("dim_bts_geo",
"http://localhost:8080/geoserver/wms", {
layers: "dw1:dim_bts_geo",
transparent: true,
format: "image/gif"
}, {
isBaseLayer: false,
buffer: 0,
visibility: false
}
)
]
});
Now that I replaced the basemap by OSM base layer . No map component
is showing anymore. the page is just empty. Is there something wrong
with the OSM basemap definition?
ᐧ
2015-05-15 20:49 GMT+02:00 Christian Mayer <chris at meggsimum.de>:
> Hi,
>
> please check the OpenLayers examples [1] and [2] which show the
> integration of Google Maps or OSM to your map.
>
> Cheers,
> Chris
>
> [1] http://dev.openlayers.org/examples/google.html
> [2] http://dev.openlayers.org/examples/osm.html
>
>
> ELKHATTABI Imane <imanekhtb at gmail.com> hat am 15. Mai 2015 um 11:37
> geschrieben:
>
> Hello everyone,
>
> I'd like to know how to define 'Open Street Map' as basemap in the
> function GeoExplorer.js
>
> 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
> ᐧ
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20150516/8423804b/attachment.htm
More information about the Users
mailing list