Discussion:
OpenLayers and GeoWebCache on GeoServer
(too old to reply)
Dipl. Inf. Carsten Eider
2011-09-27 09:13:35 UTC
Permalink
Hi list,

I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order
to get tiles from a geowebcache on a geoserver.

I have unsuccessfully worked through all examples on openlayers, but
nothing really works.
Obviously i don't know how to define the bounded box of my layers.

Are there any working examples where OL is explicitly connected to a
geowebcache with maps restricted on defined bounds?

TIA Carsten
--
Mit freundlichen Grüßen / Yours faithfully
Carsten Eider

Dipl. Inf. (FH)

Kompetenzzentrum für Innovative Informationssysteme

c/o Fachhochschule Bingen / University of applied sciences Bingen

Berlinstraße 109
55411 Bingen

Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
email: ***@fh-bingen.de
Internet: iis.fh-bingen.de
gbrun
2011-09-27 09:39:21 UTC
Permalink
Maybe a tip: in your map, you need to specify the maxExtent property wit=
h =

the bounds you defined in the projection you used for your GeoWebCache =

layers. Afterwards, you can specify the restrictedExtent of your map wit=
h =

the extent you want to see at the screen. This way, your map has the sam=
e =

bounds as your GeoWebCache layers: thus, there are no misalignment for =

your tiles (they have the same origin) between the one requested by =

OpenLayers and the others sent by GeoWebCache.

This tip depends on the way you have configured your GeoWebCache. In my =
=

case, it works with WMS layers (not TMS) and a global projection defined=
=

in GeoWebCache and assigned to each layer.

Geoffrey


Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider =
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order
to get tiles from a geowebcache on a geoserver.
I have unsuccessfully worked through all examples on openlayers, but
nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to a
geowebcache with maps restricted on defined bounds?
TIA Carsten
-- =

-- =

Geoffrey BRUN

=C9tudiant en master SIGMA
Stagiaire au PNR du Haut-Languedoc

Hameau de Brassac
Saint-Pons de Thomi=E8res
+33 (0) 6 77 74 44 16
Dipl. Inf. Carsten Eider
2011-09-27 13:57:22 UTC
Permalink
Hi Geoffrey,

thank you for your small hints, but my maxExtent=restrictedExtend=The
Google-Earth

I would like to add some more baselayers resricted to some parts of
germany explicitly as any layer other than normal wms.

Any best-practice examples available?

Carsten
Post by gbrun
Maybe a tip: in your map, you need to specify the maxExtent property
with the bounds you defined in the projection you used for your
GeoWebCache layers. Afterwards, you can specify the restrictedExtent
of your map with the extent you want to see at the screen. This way,
your map has the same bounds as your GeoWebCache layers: thus, there
are no misalignment for your tiles (they have the same origin) between
the one requested by OpenLayers and the others sent by GeoWebCache.
This tip depends on the way you have configured your GeoWebCache. In
my case, it works with WMS layers (not TMS) and a global projection
defined in GeoWebCache and assigned to each layer.
Geoffrey
Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order
to get tiles from a geowebcache on a geoserver.
I have unsuccessfully worked through all examples on openlayers, but
nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to a
geowebcache with maps restricted on defined bounds?
TIA Carsten
--
Mit freundlichen Grüßen / Yours faithfully
Carsten Eider

Dipl. Inf. (FH)

Kompetenzzentrum für Innovative Informationssysteme

c/o Fachhochschule Bingen / University of applied sciences Bingen

Berlinstraße 109
55411 Bingen

Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
email: ***@fh-bingen.de
Internet: iis.fh-bingen.de
gbrun
2011-09-27 14:42:10 UTC
Permalink
I'm sorry, I'm not used to work with Google layers! :(

One of the most common problem using GeoWebCache and OpenLayers together=
=

is that you need to specify appropriate resolutions/scales in your =

OpenLayers map. These resolutions/scales should also appear in your =

GeoWebCache layers configuration.

By the way, in GeoServer, you can identify the GeoWebCache error (if you=
=

use a GeoWebCache embedded in your GeoServer) in the log file (or in the=
=

panel admin). You can take a look at it!

Geoffrey



Le Tue, 27 Sep 2011 15:57:22 +0200, Dipl. Inf. Carsten Eider =
Post by Dipl. Inf. Carsten Eider
Hi Geoffrey,
thank you for your small hints, but my maxExtent=3DrestrictedExtend=3D=
The
Post by Dipl. Inf. Carsten Eider
Google-Earth
I would like to add some more baselayers resricted to some parts of
germany explicitly as any layer other than normal wms.
Any best-practice examples available?
Carsten
Post by gbrun
Maybe a tip: in your map, you need to specify the maxExtent property
with the bounds you defined in the projection you used for your
GeoWebCache layers. Afterwards, you can specify the restrictedExtent
of your map with the extent you want to see at the screen. This way,
your map has the same bounds as your GeoWebCache layers: thus, there
are no misalignment for your tiles (they have the same origin) betwee=
n
Post by Dipl. Inf. Carsten Eider
Post by gbrun
the one requested by OpenLayers and the others sent by GeoWebCache.
This tip depends on the way you have configured your GeoWebCache. In
my case, it works with WMS layers (not TMS) and a global projection
defined in GeoWebCache and assigned to each layer.
Geoffrey
Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order
to get tiles from a geowebcache on a geoserver.
I have unsuccessfully worked through all examples on openlayers, but=
nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to a=
geowebcache with maps restricted on defined bounds?
TIA Carsten
-- =

-- =

Geoffrey BRUN

=C9tudiant en master SIGMA
Stagiaire au PNR du Haut-Languedoc

Hameau de Brassac
Saint-Pons de Thomi=E8res
+33 (0) 6 77 74 44 16
Dipl. Inf. Carsten Eider
2011-09-30 06:48:11 UTC
Permalink
Hi Tobias,

thank you for your hints. But i cannot get it running.
I think my problem has to do with the origin and size of my
gwc-data,but i cannot grab it where to start.

So my gwc-configuration(layer iis:Luftbilder) is on
http://tc.agroconnect.fh-bingen.de/geoserver211/gwc/service/wmts?REQUEST=getcapabilities

I have setup da demo under http://lw.igreen.fh-bingen.de/igg/olc.html

My errors (see firebug-console):
<ExceptionReport version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/ows/1.1
http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd"><Exception
exceptionCode="TileOutOfRange"
locator="TILECOLUMN"><ExceptionText>Column 0 is out of range, min: 8
max:8</ExceptionText></Exception></ExceptionReport>

Any ideas?

TIA Carsten
Hi Carsten,
If you are still looking for working stuff, here is one.
Attached are 2 documents; wmtscap.html and utils.js
You obviously also need the openlayers.js file (I used 2.10 for this).
I assume you are ok with setting these files up in a web server environment.
It's not the easiest of examples I am afraid, as we use it to test
between wms / wmts / json. It should be straight forward for you to
figure it out though.
http://<<servername>>/geowebcache/service/wmts
http://<<servername>>/geoserver/MPS/wms
WFS
http://<<servername>>/geoserver/MPS/ows
Another thing is, you need to specify the gridSet for the wmts
request. And you also need to match the resolutions of your openlayers
map to the resolutions that the gwc is in.
If you get your wmts get capability document
http://<<WMTS SERVE>>/geowebcache/service/wmts?REQUEST=getcapabilities
(this structure also depends on how you have set up),
somewhere you should see a <tilematrixset></tilematrixset>. The name
in there is what you need. Ours is called BNG1.
Your local resolutions you will have had to specify when creating your
wmts layer, so you should know them.
As for working with google, I had a layer set up a while ago that
worked fine with google, but you need to make sure your gwc is in the
right projection.
var wmtslayer = new OpenLayers.Layer.WMTS({
name: "wmtslayer",
url: "<<WMTSSERVERURL>>",
layer: "<<LAYERNAME>>",
matrixSet: "EPSG:900913",
matrixIds: matrixIds,
format: "image/png",
style: "_null",
opacity: 1,
isBaseLayer: true
});
I hope some of that helps, I'm afraid I can't help you much on the
setting up gwc side, but if you need any more front end javascript
help do let me know.
Regards,
Toby R
As for working in google,
Post by Dipl. Inf. Carsten Eider
Hi Geoffrey,
thank you for your small hints, but my maxExtent=restrictedExtend=The
Google-Earth
I would like to add some more baselayers resricted to some parts of
germany explicitly as any layer other than normal wms.
Any best-practice examples available?
Carsten
Post by gbrun
Maybe a tip: in your map, you need to specify the maxExtent property
with the bounds you defined in the projection you used for your
GeoWebCache layers. Afterwards, you can specify the restrictedExtent
of your map with the extent you want to see at the screen. This way,
your map has the same bounds as your GeoWebCache layers: thus, there
are no misalignment for your tiles (they have the same origin) between
the one requested by OpenLayers and the others sent by GeoWebCache.
This tip depends on the way you have configured your GeoWebCache. In
my case, it works with WMS layers (not TMS) and a global projection
defined in GeoWebCache and assigned to each layer.
Geoffrey
Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order
to get tiles from a geowebcache on a geoserver.
I have unsuccessfully worked through all examples on openlayers, but
nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to a
geowebcache with maps restricted on defined bounds?
TIA Carsten
--
Mit freundlichen Grüßen / Yours faithfully
Carsten Eider
Dipl. Inf. (FH)
Kompetenzzentrum für Innovative Informationssysteme
c/o Fachhochschule Bingen / University of applied sciences Bingen
Berlinstraße 109
55411 Bingen
Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
Internet: iis.fh-bingen.de
_______________________________________________
Users mailing list
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Mit freundlichen Grüßen / Yours faithfully
Carsten Eider

Dipl. Inf. (FH)

Kompetenzzentrum für Innovative Informationssysteme

c/o Fachhochschule Bingen / University of applied sciences Bingen

Berlinstraße 109
55411 Bingen

Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
email: ***@fh-bingen.de
Internet: iis.fh-bingen.de
Arnd Wippermann
2011-09-30 16:35:21 UTC
Permalink
Hi,

uncomment

//tileOrigin:origin.transform(proj4326,MAP_PROJECTION),
//tileFullExtent:bounds.transform(proj4326,MAP_PROJECTION),

then it should work. The service use the same values as EPSG:900913 in
OpenLayers.

Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-***@lists.osgeo.org
[mailto:openlayers-users-***@lists.osgeo.org] Im Auftrag von Dipl. Inf.
Carsten Eider
Gesendet: Freitag, 30. September 2011 08:48
An: Tobias Reinicke; openlayers users
Betreff: Re: [OpenLayers-Users] OpenLayers and GeoWebCache on GeoServer

Hi Tobias,

thank you for your hints. But i cannot get it running.
I think my problem has to do with the origin and size of my gwc-data,but i
cannot grab it where to start.

So my gwc-configuration(layer iis:Luftbilder) is on
http://tc.agroconnect.fh-bingen.de/geoserver211/gwc/service/wmts?REQUEST=get
capabilities

I have setup da demo under http://lw.igreen.fh-bingen.de/igg/olc.html

My errors (see firebug-console):
<ExceptionReport version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/ows/1.1
http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd"><Exception
exceptionCode="TileOutOfRange"
locator="TILECOLUMN"><ExceptionText>Column 0 is out of range, min: 8
max:8</ExceptionText></Exception></ExceptionReport>

Any ideas?

TIA Carsten
Hi Carsten,
If you are still looking for working stuff, here is one.
Attached are 2 documents; wmtscap.html and utils.js
You obviously also need the openlayers.js file (I used 2.10 for this).
I assume you are ok with setting these files up in a web server environment.
It's not the easiest of examples I am afraid, as we use it to test
between wms / wmts / json. It should be straight forward for you to
figure it out though.
http://<<servername>>/geowebcache/service/wmts
http://<<servername>>/geoserver/MPS/wms
WFS
http://<<servername>>/geoserver/MPS/ows
Another thing is, you need to specify the gridSet for the wmts
request. And you also need to match the resolutions of your openlayers
map to the resolutions that the gwc is in.
If you get your wmts get capability document http://<<WMTS
SERVE>>/geowebcache/service/wmts?REQUEST=getcapabilities
(this structure also depends on how you have set up), somewhere you
should see a <tilematrixset></tilematrixset>. The name in there is
what you need. Ours is called BNG1.
Your local resolutions you will have had to specify when creating your
wmts layer, so you should know them.
As for working with google, I had a layer set up a while ago that
worked fine with google, but you need to make sure your gwc is in the
right projection.
var wmtslayer = new OpenLayers.Layer.WMTS({
name: "wmtslayer",
url: "<<WMTSSERVERURL>>",
layer: "<<LAYERNAME>>",
matrixSet: "EPSG:900913",
matrixIds: matrixIds,
format: "image/png",
style: "_null",
opacity: 1,
isBaseLayer: true
});
I hope some of that helps, I'm afraid I can't help you much on the
setting up gwc side, but if you need any more front end javascript
help do let me know.
Regards,
Toby R
As for working in google,
Post by Dipl. Inf. Carsten Eider
Hi Geoffrey,
thank you for your small hints, but my maxExtent=restrictedExtend=The
Google-Earth
I would like to add some more baselayers resricted to some parts of
germany explicitly as any layer other than normal wms.
Any best-practice examples available?
Carsten
Post by gbrun
Maybe a tip: in your map, you need to specify the maxExtent property
with the bounds you defined in the projection you used for your
GeoWebCache layers. Afterwards, you can specify the restrictedExtent
of your map with the extent you want to see at the screen. This way,
your map has the same bounds as your GeoWebCache layers: thus, there
are no misalignment for your tiles (they have the same origin)
between the one requested by OpenLayers and the others sent by
GeoWebCache.
Post by Dipl. Inf. Carsten Eider
Post by gbrun
This tip depends on the way you have configured your GeoWebCache. In
my case, it works with WMS layers (not TMS) and a global projection
defined in GeoWebCache and assigned to each layer.
Geoffrey
Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order to get tiles from a geowebcache
on a geoserver.
I have unsuccessfully worked through all examples on openlayers,
but nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to
a geowebcache with maps restricted on defined bounds?
TIA Carsten
--
Mit freundlichen Grüßen / Yours faithfully Carsten Eider
Dipl. Inf. (FH)
Kompetenzzentrum für Innovative Informationssysteme
c/o Fachhochschule Bingen / University of applied sciences Bingen
Berlinstraße 109
55411 Bingen
Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
Internet: iis.fh-bingen.de
_______________________________________________
Users mailing list
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Mit freundlichen Grüßen / Yours faithfully Carsten Eider

Dipl. Inf. (FH)

Kompetenzzentrum für Innovative Informationssysteme

c/o Fachhochschule Bingen / University of applied sciences Bingen

Berlinstraße 109
55411 Bingen

Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
email: ***@fh-bingen.de
Internet: iis.fh-bingen.de
Carsten Eider
2011-09-30 21:18:29 UTC
Permalink
Hi Arnd,

there were more problems but now it works for me.

TIA Carsten
Post by Arnd Wippermann
Hi,
uncomment
//tileOrigin:origin.transform(proj4326,MAP_PROJECTION),
//tileFullExtent:bounds.transform(proj4326,MAP_PROJECTION),
then it should work. The service use the same values as EPSG:900913 in
OpenLayers.
Arnd
-----Ursprüngliche Nachricht-----
Carsten Eider
Gesendet: Freitag, 30. September 2011 08:48
An: Tobias Reinicke; openlayers users
Betreff: Re: [OpenLayers-Users] OpenLayers and GeoWebCache on GeoServer
Hi Tobias,
thank you for your hints. But i cannot get it running.
I think my problem has to do with the origin and size of my gwc-data,but i
cannot grab it where to start.
So my gwc-configuration(layer iis:Luftbilder) is on
http://tc.agroconnect.fh-bingen.de/geoserver211/gwc/service/wmts?REQUEST=get
capabilities
I have setup da demo under http://lw.igreen.fh-bingen.de/igg/olc.html
<ExceptionReport version="1.1.0"
xsi:schemaLocation="http://www.opengis.net/ows/1.1
http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd"><Exception
exceptionCode="TileOutOfRange"
locator="TILECOLUMN"><ExceptionText>Column 0 is out of range, min: 8
max:8</ExceptionText></Exception></ExceptionReport>
Any ideas?
TIA Carsten
Hi Carsten,
If you are still looking for working stuff, here is one.
Attached are 2 documents; wmtscap.html and utils.js
You obviously also need the openlayers.js file (I used 2.10 for this).
I assume you are ok with setting these files up in a web server
environment.
It's not the easiest of examples I am afraid, as we use it to test
between wms / wmts / json. It should be straight forward for you to
figure it out though.
http://<<servername>>/geowebcache/service/wmts
http://<<servername>>/geoserver/MPS/wms
WFS
http://<<servername>>/geoserver/MPS/ows
Another thing is, you need to specify the gridSet for the wmts
request. And you also need to match the resolutions of your openlayers
map to the resolutions that the gwc is in.
If you get your wmts get capability document http://<<WMTS
SERVE>>/geowebcache/service/wmts?REQUEST=getcapabilities
(this structure also depends on how you have set up), somewhere you
should see a <tilematrixset></tilematrixset>. The name in there is
what you need. Ours is called BNG1.
Your local resolutions you will have had to specify when creating your
wmts layer, so you should know them.
As for working with google, I had a layer set up a while ago that
worked fine with google, but you need to make sure your gwc is in the
right projection.
var wmtslayer = new OpenLayers.Layer.WMTS({
name: "wmtslayer",
url: "<<WMTSSERVERURL>>",
layer: "<<LAYERNAME>>",
matrixSet: "EPSG:900913",
matrixIds: matrixIds,
format: "image/png",
style: "_null",
opacity: 1,
isBaseLayer: true
});
I hope some of that helps, I'm afraid I can't help you much on the
setting up gwc side, but if you need any more front end javascript
help do let me know.
Regards,
Toby R
As for working in google,
Post by Dipl. Inf. Carsten Eider
Hi Geoffrey,
thank you for your small hints, but my maxExtent=restrictedExtend=The
Google-Earth
I would like to add some more baselayers resricted to some parts of
germany explicitly as any layer other than normal wms.
Any best-practice examples available?
Carsten
Post by gbrun
Maybe a tip: in your map, you need to specify the maxExtent property
with the bounds you defined in the projection you used for your
GeoWebCache layers. Afterwards, you can specify the restrictedExtent
of your map with the extent you want to see at the screen. This way,
your map has the same bounds as your GeoWebCache layers: thus, there
are no misalignment for your tiles (they have the same origin)
between the one requested by OpenLayers and the others sent by
GeoWebCache.
Post by Dipl. Inf. Carsten Eider
Post by gbrun
This tip depends on the way you have configured your GeoWebCache. In
my case, it works with WMS layers (not TMS) and a global projection
defined in GeoWebCache and assigned to each layer.
Geoffrey
Le Tue, 27 Sep 2011 11:13:35 +0200, Dipl. Inf. Carsten Eider
Post by Dipl. Inf. Carsten Eider
Hi list,
I am looking for working examples where Openlayers uses
WMTS/TMS/TileCache layers in order to get tiles from a geowebcache
on a geoserver.
I have unsuccessfully worked through all examples on openlayers,
but nothing really works.
Obviously i don't know how to define the bounded box of my layers.
Are there any working examples where OL is explicitly connected to
a geowebcache with maps restricted on defined bounds?
TIA Carsten
--
Mit freundlichen Grüßen / Yours faithfully Carsten Eider
Dipl. Inf. (FH)
Kompetenzzentrum für Innovative Informationssysteme
c/o Fachhochschule Bingen / University of applied sciences Bingen
Berlinstraße 109
55411 Bingen
Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
Internet: iis.fh-bingen.de
_______________________________________________
Users mailing list
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Mit freundlichen Grüßen / Yours faithfully Carsten Eider
Dipl. Inf. (FH)
Kompetenzzentrum für Innovative Informationssysteme
c/o Fachhochschule Bingen / University of applied sciences Bingen
Berlinstraße 109
55411 Bingen
Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 994-251
Internet: iis.fh-bingen.de
_______________________________________________
Users mailing list
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Continue reading on narkive:
Loading...