[GeoNetwork-users] Issues configuring maps in GN 2.6.0

Hi,

I am trying to configure the maps (mapSearch/mapViewer) en MD extent views within GN 2.6.0 with different SRSs, tile extents and resolutions (for the Dutch coordinate system). I got quite far by modifying config-gui.xml and main-page.xsl and overriding ExtentMap.js. I have 1 real issue and a suggestion for improving the configuration of maps.

The issue I found is that all layers seem to be treated as tiled WMS (-C) layers, even the layers (like Ortophoto) that are initially configured with the built-in GeoServer. (just look at all the WMS requests in e.g. Firebug). Normally, in OpenLayers "untiled" WMS can be enforced by setting "singleTile: true" within the layer option. But when I set "singleTile: true" in any <layer> element in config-gui.xml I get a JavaScript error on page loading (Error: position is null Source File: http://127.0.0.1:8080/geonetwork/scripts/openlayers/OpenLayers.js Line: 640). I've tried debugging in Firebug. It looks like is that the size of the DOM/Map element is unknown at map init and all calculations result in NaN. Possibly someone can enlighten or should I open a ticket ?

The second issue is an improvement I see in configuration of maps: OpenLayers has lots of config options. Some of it is now in config-gui, some in XSL and some in JavaScript (e.g. extentMap). Ideally everything would be configured in config-gui. Configuring in JS (JSON structures) would be easiest. Maybe some JS structures in config-gui which are eval-ed or mimick a JS config in XML, or plain JS files ?

But in general: GN rocks.

best,

--Just

Just van den Broecke
The Netherlands
http://www.justobjects.nl

Hi Just

Thanks for your tests and comments. About the singleTile parameter, please
open a bug and i will check for a fix.

About the config-gui.xml, the params and options values in layers
definitions are intended to put the json array with the configuration of the
layers, but maybe need improve support.

Regards,
Jose García

On Tue, Oct 12, 2010 at 1:23 PM, Just van den Broecke
<just@anonymised.com>wrote:

Hi,

I am trying to configure the maps (mapSearch/mapViewer) en MD extent
views within GN 2.6.0 with different SRSs, tile extents and resolutions
(for the Dutch coordinate system). I got quite far by modifying
config-gui.xml and main-page.xsl and overriding ExtentMap.js. I have 1
real issue and a suggestion for improving the configuration of maps.

The issue I found is that all layers seem to be treated as tiled WMS
(-C) layers, even the layers (like Ortophoto) that are initially
configured with the built-in GeoServer. (just look at all the WMS
requests in e.g. Firebug). Normally, in OpenLayers "untiled" WMS can be
enforced by setting "singleTile: true" within the layer option. But when
I set "singleTile: true" in any <layer> element in config-gui.xml I get
a JavaScript error on page loading (Error: position is null Source File:
http://127.0.0.1:8080/geonetwork/scripts/openlayers/OpenLayers.js Line:
640). I've tried debugging in Firebug. It looks like is that the size of
the DOM/Map element is unknown at map init and all calculations result
in NaN. Possibly someone can enlighten or should I open a ticket ?

The second issue is an improvement I see in configuration of maps:
OpenLayers has lots of config options. Some of it is now in config-gui,
some in XSL and some in JavaScript (e.g. extentMap). Ideally everything
would be configured in config-gui. Configuring in JS (JSON structures)
would be easiest. Maybe some JS structures in config-gui which are
eval-ed or mimick a JS config in XML, or plain JS files ?

But in general: GN rocks.

best,

--Just

Just van den Broecke
The Netherlands
http://www.justobjects.nl

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Jose,

Thanks. The ticket: http://trac.osgeo.org/geonetwork/ticket/346

On configuring: it would be helpful to have at least options for the OpenLayers Map objects configurable in config-gui (similar to "options" in <layer> elements). Also for extentMap.

best,

--Just

On 12-10-10 13:34, jose garcia wrote:

Hi Just

Thanks for your tests and comments. About the singleTile parameter,
please open a bug and i will check for a fix.

About the config-gui.xml, the params and options values in layers
definitions are intended to put the json array with the configuration of
the layers, but maybe need improve support.

Regards,
Jose García

On Tue, Oct 12, 2010 at 1:23 PM, Just van den Broecke
<just@anonymised.com <mailto:just@anonymised.com>> wrote:

    Hi,

    I am trying to configure the maps (mapSearch/mapViewer) en MD extent
    views within GN 2.6.0 with different SRSs, tile extents and resolutions
    (for the Dutch coordinate system). I got quite far by modifying
    config-gui.xml and main-page.xsl and overriding ExtentMap.js. I have 1
    real issue and a suggestion for improving the configuration of maps.

    The issue I found is that all layers seem to be treated as tiled WMS
    (-C) layers, even the layers (like Ortophoto) that are initially
    configured with the built-in GeoServer. (just look at all the WMS
    requests in e.g. Firebug). Normally, in OpenLayers "untiled" WMS can be
    enforced by setting "singleTile: true" within the layer option. But when
    I set "singleTile: true" in any <layer> element in config-gui.xml I get
    a JavaScript error on page loading (Error: position is null Source File:
    http://127.0.0.1:8080/geonetwork/scripts/openlayers/OpenLayers.js Line:
    640). I've tried debugging in Firebug. It looks like is that the size of
    the DOM/Map element is unknown at map init and all calculations result
    in NaN. Possibly someone can enlighten or should I open a ticket ?

    The second issue is an improvement I see in configuration of maps:
    OpenLayers has lots of config options. Some of it is now in config-gui,
    some in XSL and some in JavaScript (e.g. extentMap). Ideally everything
    would be configured in config-gui. Configuring in JS (JSON structures)
    would be easiest. Maybe some JS structures in config-gui which are
    eval-ed or mimick a JS config in XML, or plain JS files ?

    But in general: GN rocks.

    best,

    --Just

    Just van den Broecke
    The Netherlands
    http://www.justobjects.nl

    ------------------------------------------------------------------------------
    Beautiful is writing same markup. Internet Explorer 9 supports
    standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
    Spend less time writing and rewriting code and more time creating great
    experiences on the web. Be a part of the beta today.
    http://p.sf.net/sfu/beautyoftheweb
    _______________________________________________
    GeoNetwork-users mailing list
    GeoNetwork-users@lists.sourceforge.net
    <mailto:GeoNetwork-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geonetwork-users
    GeoNetwork OpenSource is maintained at
    http://sourceforge.net/projects/geonetwork

Hi Just

I'll check also to include the map options in the config-gui.xml file.

Thanks for feedback,
Jose Garc

On Tue, Oct 12, 2010 at 1:56 PM, Just van den Broecke
<just@anonymised.com>wrote:

Hi Jose,

Thanks. The ticket: http://trac.osgeo.org/geonetwork/ticket/346

On configuring: it would be helpful to have at least options for the
OpenLayers Map objects configurable in config-gui (similar to "options"
in <layer> elements). Also for extentMap.

best,

--Just

On 12-10-10 13:34, jose garcia wrote:
> Hi Just
>
> Thanks for your tests and comments. About the singleTile parameter,
> please open a bug and i will check for a fix.
>
> About the config-gui.xml, the params and options values in layers
> definitions are intended to put the json array with the configuration of
> the layers, but maybe need improve support.
>
> Regards,
> Jose García
>
> On Tue, Oct 12, 2010 at 1:23 PM, Just van den Broecke
> <just@anonymised.com <mailto:just@anonymised.com>> wrote:
>
> Hi,
>
> I am trying to configure the maps (mapSearch/mapViewer) en MD extent
> views within GN 2.6.0 with different SRSs, tile extents and
resolutions
> (for the Dutch coordinate system). I got quite far by modifying
> config-gui.xml and main-page.xsl and overriding ExtentMap.js. I have
1
> real issue and a suggestion for improving the configuration of maps.
>
> The issue I found is that all layers seem to be treated as tiled WMS
> (-C) layers, even the layers (like Ortophoto) that are initially
> configured with the built-in GeoServer. (just look at all the WMS
> requests in e.g. Firebug). Normally, in OpenLayers "untiled" WMS can
be
> enforced by setting "singleTile: true" within the layer option. But
when
> I set "singleTile: true" in any <layer> element in config-gui.xml I
get
> a JavaScript error on page loading (Error: position is null Source
File:
> http://127.0.0.1:8080/geonetwork/scripts/openlayers/OpenLayers.jsLine:
> 640). I've tried debugging in Firebug. It looks like is that the size
of
> the DOM/Map element is unknown at map init and all calculations
result
> in NaN. Possibly someone can enlighten or should I open a ticket ?
>
> The second issue is an improvement I see in configuration of maps:
> OpenLayers has lots of config options. Some of it is now in
config-gui,
> some in XSL and some in JavaScript (e.g. extentMap). Ideally
everything
> would be configured in config-gui. Configuring in JS (JSON
structures)
> would be easiest. Maybe some JS structures in config-gui which are
> eval-ed or mimick a JS config in XML, or plain JS files ?
>
> But in general: GN rocks.
>
> best,
>
> --Just
>
> Just van den Broecke
> The Netherlands
> http://www.justobjects.nl
>
>
>
>
>
>
>
------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating
great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> GeoNetwork-users mailing list
> GeoNetwork-users@lists.sourceforge.net
> <mailto:GeoNetwork-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>
>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Just,

I write to you to ask for some help, since I'm also trying to configure the
maps (mapSearch/mapViewer).

To do that, I change the <bounds> element in both, <mapSearch> and
<mapViewer> elements (config-gui.xml file). The minimap (map on the left
side) shows the map correctly in those bounds specified inside the
<mapSearch> tag . However, the map viewer (map on the right side) does not
fit the entire panel, but only a quadrant of the panel, becoming the rest of
the MapViewer blank.

What extra actions should I have done? You talk about changing main-page.xsl
and ExtentMap.js, can you explain me what should I change in order to
display the bounds in the map viewer taking up the full panel?

Thanks in advance,

Best regards
Montse Marco
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Issues-configuring-maps-in-GN-2-6-0-tp5626311p5634640.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Montse

Can you provide the bounds configuration in config-gui.xml to test locallly?

Regards,
Jose Garcia

On Thu, Oct 14, 2010 at 1:43 PM, mmarco <mmarcosabate@anonymised.com> wrote:

Hi Just,

I write to you to ask for some help, since I'm also trying to configure the
maps (mapSearch/mapViewer).

To do that, I change the <bounds> element in both, <mapSearch> and
<mapViewer> elements (config-gui.xml file). The minimap (map on the left
side) shows the map correctly in those bounds specified inside the
<mapSearch> tag . However, the map viewer (map on the right side) does not
fit the entire panel, but only a quadrant of the panel, becoming the rest
of
the MapViewer blank.

What extra actions should I have done? You talk about changing
main-page.xsl
and ExtentMap.js, can you explain me what should I change in order to
display the bounds in the map viewer taking up the full panel?

Thanks in advance,

Best regards
Montse Marco
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Issues-configuring-maps-in-GN-2-6-0-tp5626311p5634640.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Hi Jose,

Our scope is Barcelona Provincial Council. Here is a copy&paste of the
<mapViewer> section:

<mapViewer>
  <layers>
    <layer server="http://sitmun.diba.cat/wms/servlet/BUE1M&quot;
tocName="disponibilitat base urbana" params="{layers:
'MTE50_Disponibilitat', transparent: 'true', format: 'image/jpeg'}"
options="{}" />
<layer server="http://www.idee.es/wms/IDEE-Base/IDEE-Base&quot; tocName="IDEE
Base" params="{layers: 'Todas', format: 'image/jpeg'}"
options="{isBaseLayer: true}" />
  </layers>
  <proj>
    <crs code="EPSG:4326" default="1" name="WGS84 (lat/lon)" />
  </proj>
   <bounds west="1.025" south="41.16" east="3.044" north="42.38" />

When I look at the WMS call (through "WMS Inspector" Firefox plug-in), the
WMS calls are:

http://sitmun.diba.cat/wms/servlet/BUE1M?LAYERS=MTE50_Disponibilitat&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=1.025,41.16,91.025,131.16&WIDTH=256&HEIGHT=256

http://www.idee.es/wms/IDEE-Base/IDEE-Base?LAYERS=Todas&FORMAT=image%2Fjpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=1.025,41.16,91.025,131.16&WIDTH=256&HEIGHT=256

It seems that 90 degrees are added to north and east coordinates...

By the way, pressing the "Full Extent" button the maps displays properly.

Tested with IE 7.0 and Firefox 3.6.10.

Thanks a lot in advance,

Best regards
Montse

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Issues-configuring-maps-in-GN-2-6-0-tp5626311p5637883.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Dear list,

Am having similar problems to other contributors configuring the mapsearch and mapviewer in GN 2.6.0 (Linux/Tomcat/Postgis). What I want is for both mapsearch and mapviewer to operate in Antarctic Polar Stereographic (EPSG:3031) - units meters - and use a group of layers served by an existing Geoserver installation. I would like to use a set of 15 predefined OpenLayers zoom scales starting at 40000000.

I have tried changing config-gui.xml to add my projection under map/proj (<crs code="EPSG:3031" default="1" def="+proj=stere +lat_0=-90 +lat_ts=-71 +long_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" />), and added some layers.

What I get is most of what was expected, except for the WMS requests are made with a really small bounding box, indicating probably that EPSG:4326 is still being used somewhere. The scales in the zoom pulldown are also very small numbers. Reading the previous post in this thread, I can see I might need to change scripts/geo/extentMap.js, and possibly scripts/ol_map.js and scripts/ol_minimap.js (these latter two to insert the scales I mentioned above).

I can see in main-page.xsl that the normal route for GN is to use minified Javascript in scripts/lib. It appears as if there is a debug mode (line 41 <xsl:when test="/root/request/debug">), but I am unsure how to turn this on - if I were able to do this GN would use the non-minified scripts. Anyone help here? I could always just remove the xsl:choose bit I know, but it would be good to figure things out with debug mode!

Also, if I do change any Javascript, what is the process for remaking the scripts/lib minified versions? It is presumably rather like OpenLayers' build.py with the config file full.cfg. However I cannot find the build script for GN anywhere. Anyone help on this?

With thanks,

David Herbert
British Antarctic Survey.

--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.

Hi,

2010/10/15 Herbert, David J <darb1@anonymised.com>:

Dear list,

Am having similar problems to other contributors configuring the mapsearch and mapviewer in GN 2.6.0 (Linux/Tomcat/Postgis). What I want is for both mapsearch and mapviewer to operate in Antarctic Polar Stereographic (EPSG:3031) - units meters - and use a group of layers served by an existing Geoserver installation. I would like to use a set of 15 predefined OpenLayers zoom scales starting at 40000000.

I have tried changing config-gui.xml to add my projection under map/proj (<crs code="EPSG:3031" default="1" def="+proj=stere +lat_0=-90 +lat_ts=-71 +long_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" />), and added some layers.

What I get is most of what was expected, except for the WMS requests are made with a really small bounding box, indicating probably that EPSG:4326 is still being used somewhere. The scales in the zoom pulldown are also very small numbers. Reading the previous post in this thread, I can see I might need to change scripts/geo/extentMap.js, and possibly scripts/ol_map.js and scripts/ol_minimap.js (these latter two to insert the scales I mentioned above).

I can see in main-page.xsl that the normal route for GN is to use minified Javascript in scripts/lib. It appears as if there is a debug mode (line 41 <xsl:when test="/root/request/debug">), but I am unsure how to turn this on - if I were able to do this GN would use the non-minified scripts. Anyone help here? I could always just remove the xsl:choose bit I know, but it would be good to figure things out with debug mode!

Add debug to your url, main.home?debug

Also, if I do change any Javascript, what is the process for remaking the scripts/lib minified versions? It is presumably rather like OpenLayers' build.py with the config file full.cfg. However I cannot find the build script for GN anywhere. Anyone help on this?

You need the source from SVN and run
mvn net.alchim31.maven:yuicompressor-maven-plugin:compress
in the web directory.

HTH.

Francois

With thanks,

David Herbert
British Antarctic Survey.

--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork