GeoServer v: 2.4.4

OpenLayers v: 2.13

All maps are WMS.

In my JavaScript I use "layer.name" to access the Title of the specific map as specified in my GeoServer layer. Using jQuery I was able to inject the "layer.name" of the selected map in the footer of my HTML. Now I would like to add a hyper-reference of the metadata.

In GeoServer, I have specified the URL of my metadata under the header: "Metadata Links" in the field URL. (This all seems very logical and simple).

The issue I am having, is that I don't know how to access this URL... I've searched the documentation, but can't find any syntax that would allow me to easily access this field.

I would like to avoid typing in the URL manually, because I have a whole list of maps, and I have added the metadata for each map in GeoNetwork.

Does anyone know how to get the "Metadata link URL" field with OpenLayers? Or have a nice workaround?

  • They should be in the GetCapabilities file under each layer section - can you add some of your capabilities file? – Ian Turton Jun 29 '15 at 14:06
  • Hey, iant, tnx for the reply! But I'm pretty new to this, so could you be a bit more specific please? – J.A.Cado Jun 29 '15 at 14:39
  • I've had a look around and found in geoserver standard wms capabilities 1.1.1 and 1.3.0. I'm currently playing around sending GET-requests (using postman) But I still don't know how to access the MetadataURL of a specific layer... – J.A.Cado Jun 29 '15 at 15:29
  • look in the document returned by a getcapabilities request - it should include your metadata URL. – Ian Turton Jun 29 '15 at 15:34
  • Oh wow...You are correct! It does return it. I just need to find a way to access it... – J.A.Cado Jun 29 '15 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.