[OpenLayers-Users] GeoExt + OpenLayers: WMSGetCapabilities->WMS
layering onto OSM
Zoran Jankovic
zoran.m.jankovic at gmail.com
Wed Jun 16 12:15:10 EDT 2010
OK, here is how I defined my WMS layer that I'm showing on top of Gmaps. The
key is to define "srs" parameter to Geoserver. In my case this is a custom
projection that can be defined in epsg.properties
var tiled = new OpenLayers.Layer.WMS("ulice_kutina - Tiled", "
http://89.164.44.84/geoserver/wms",
{
layers: 'zoran:ulice',
styles: '',
srs: '222222',
format: 'image/png',
tiled: 'true',
transparent: true
},
{
'opacity': 1, 'isBaseLayer': false, 'wrapDateLine': true
}
);
I also set up custom displayProjection, but for that I had to employ
Proj4js-compressed.js (thanks Mike Adair!).
Google displayProjection and Geoserver, you'll find plenty of examples...
Best regards,
---
Zoran Jankovic
ZIS-Izrada softvera i savjetovanje / ZIS - Software Development and
Consulting
http://www.zisis.hr
M: 00 385 98 682 902
T: 00 385 44 683 374
A. Senoe 4
44320 Kutina
Croatia
On Wed, Jun 16, 2010 at 6:00 PM, Jefferson Heard <
jefferson.r.heard at gmail.com> wrote:
> Right, but GeoServer can; those servers can reproject my tiles for me, but
> I can't seem to figure out how to adjust the WMS request that OpenLayers is
> making.
>
> On Jun 16, 2010, at 11:52 AM, <christopher.schmidt at nokia.com> <
> christopher.schmidt at nokia.com> wrote:
>
> >
> > On Jun 16, 2010, at 11:47 AM, ext Jefferson Heard wrote:
> >
> >> I'm trying to layer a WMS layer onto an OpenStreetMaps map. I'm getting
> WMS layers from WMSGetCapabilities records coming from GeoExt. My base
> layer is, of course, spherical mercator (OSM), but my WMS layers are
> EPSG:4326 - namely the NOAA Weather Radar Mosaic and IR base reflectivity
> images. Does anyone know how to do this? Currently, I'm doing this:
> >>
> >> var grid = Ext.getCmp('avail_overlays_grid');
> >> var record = grid.getSelectionModel().getSelected();
> >> if(record) {
> >> var copy = record.copy();
> >> copy.data["layer"] = record.get("layer");
> >> copy.get("layer").mergeNewParams({
> >> format: "image/png",
> >> transparent: true,
> >> reproject: true
> >> });
> >> copy.get("layer").shared=false;
> >> copy.get("layer").displayInLayerSwitcher=true;
> >> panel.layers.add(copy);
> >> }
> >
> > All raster layers must be in the same projection. OpenLayers
> > can't reproject images.
> >
> > Regards,
> > --
> > Christopher Schmidt
> > Nokia
> >
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100616/9b3e7a3a/attachment.html
More information about the Users
mailing list