[OpenLayers-Users] OpenLayers and GeoWebCache on GeoServer
Carsten Eider
eider at fh-bingen.de
Fri Sep 30 17:18:29 EDT 2011
Hi Arnd,
there were more problems but now it works for me.
TIA Carsten
Am 30.09.2011 18:35, schrieb 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-----
> Von: openlayers-users-bounces at lists.osgeo.org
> [mailto:openlayers-users-bounces at 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
>
>
>
> Am 28.09.2011 14:50, schrieb Tobias Reinicke:
>> 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.
>> The urls that we use take the form of:
>> WMTS:
>> http://<<servername>>/geowebcache/service/wmts
>> WMS:
>> 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.
>> The layer code was:
>>
>>
>> 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,
>>
>> On 27 September 2011 14:57, Dipl. Inf. Carsten Eider <eider at fh-bingen.de>
> wrote:
>>> 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
>>>
>>> Am 27.09.2011 11:39, schrieb 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
>>>> <eider at fh-bingen.de> a écrit:
>>>>
>>>>> 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: eider at fh-bingen.de
>>> Internet: iis.fh-bingen.de
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.osgeo.org
>>> 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: eider at fh-bingen.de
> Internet: iis.fh-bingen.de
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
More information about the Users
mailing list