1 (edited by namwebs 17-02-2016 15:22:57)

Topic: Openlayers and geoserver integration

Another question: on a Report, using e.g. Dynamic Report Explorer is there any way to bring in GeoServer layers using PHP - for example putting something like this in the WMS layers from GeoServer box:
powerlinestool: <?php return $_GET['dynamic-taxon_meaning_list'];?>

This doesn't work but hopefully shows what I am trying to do if I have a GeoServer layer with the same name as the taxon_meaning_list.

For my site I need to set up various map outputs which will be different from the standard Indicia report outputs and which will call a lot of shapefile layers from GeoServer. On other Drupal sites I have used the Openlayers and Views modules to do this (e.g. http://www.landscapesnamibia.org/fish-r … scape-maps).

Rather than keep coming back to the forum with endless questions on how to configure/understand the report outputs, I'm wondering if it may be better - for my needs - to set up my own outputs using Openlayers and Views. From other posts (e.g. http://forums.nbn.org.uk/viewtopic.php?id=6059) I can see that Indicia is using Openlayers in some kind of integrated way, but it is not listed in the modules. So the key question is: if I install the Openlayers module (and the GeoServer module if needed), is it going to mess up the functionality of the Indicia reports? Or is there a way to access these modules which are already installed as part of Indicia?

I hope someone can understand what I am asking.

Alice

2

Re: Openlayers and geoserver integration

Hi Alice,

A bit more Indicia background to fill out the picture.

The client_helpers library is a suite of functions to assist developers to create websites which interact with an Indicia warehouse.
For example the map_panel() function in client_helpers/map_helper.php creates an OpenLayers map while the report_map() function in client_helpers/report_helper.php extracts data from the warehouse to show on a map.

Where client-side javascript is required, such as the OpenLayers library, this is stored in the media library and loaded when needed.

The client_helpers/prebuilt_forms are, if you like, examples of useful forms that can be created using the client_helpers library. They are configurable through an array of arguments

No assumption about the use of Drupal has been made up to this point.

The Drupal iForm module makes the prebuilt_forms available in a Drupal website. When you edit a form you are configuring the arguments that the prebuilt_form accepts.

When you want to go beyond the function of the existing prebuilt_forms you can extend the system by developing your own prebuilt_form. You can often inherit nearly all you want from an existing form and just add on the code needed to create another argument and to alter the output accordingly.

Getting to your specific questions:

1. In the same way that in http://forums.nbn.org.uk/viewtopic.php?pid=24131#p24131 I proposed a modification to the code  to parse the 'WMS layers from GeoServer' for a title it could also parse for a replacement token and insert some calculated value. (i.e. you are looking for a function not currently implemented and it needs an extension to the code.)

2. As explained above, our use of OpenLayers is independent of Drupal which is why it is not listed as a Drupal module. We are still using OpenLayers version 2 whilst the Drupal module is now on version 3. Version 2 uses the namespace OpenLayers.* while version 3 uses ol.*. For this reason I would guess that they would not interfere.

3. To make use of the OpenLayers that comes with Indicia in a way that is not currently supported will involve you in some programming. We welcome code contributions that improve Indicia!

Hope that helps,
Jim Bacon.