[GeoNetwork-users] Hiding the Map Viewer

Hi Folks,
I've been fiddling with 2.6.0RC0 to customise it for our purposes. I want
to remove the drop-down "map viewer" that appears in the main panel of the
main page because we won't use that function (ability to visualise data)
within geonetwork.
Unfortunately, while the rest of GeoNetwork is lovely and modifiable, that
particular feature seems to be pivotal to page layout. If I remove/rename
the line (specifically the "id" attribute):
          <div id="map_container" style="overflow:hidden; clear: both;">
Then not only does the bar map-bar disappear (good), but the entire page
completely loses its formatting (v. bad).

So the question is simple - is there a way to disable the drop-down map
without losing the formatting?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Hi Jonathan

You can check in main-page.xsl to comment the code highlighted (from latest
code in trunk, a bit different from RC0 code):

Ext.onReady(function(){
                $("loading").hide();
                ...

* //GeoNetwork.MapStateManager.loadMapState();

                //initMapViewer();
                //var mapViewport = GeoNetwork.mapViewer.getViewport();*

                ...

                             items: [
                                            */*{region:'north',
                                            id: 'north-map-panel',
                                            title: '<xsl:value-of
select="/root/gui/strings/mapViewer"/>',
                                            border:false,
                                            collapsible: true,
                                            collapsed: true,
                                            split: true,
                                            height: 450,
                                            minSize: 300,
                                            //maxSize: 500,
                                            layout: 'fit',
                                            listeners: {
                                                  collapse: collapseMap,
                                                  expand: expandMap
                                               },
                                            items: [mapViewport]

                                            },*/*

                                            {region:'center',
                                            contentEl :'content',
                                            border:false,
                                            autoScroll: true
                                            }
                                        ]

I'll try to check next week to add a configurable option so this can be done
in an easy way.

Regards,
Jose Garcia

On Fri, Jul 30, 2010 at 2:47 PM, <jonathanmoules@anonymised.com> wrote:

Hi Folks,
I've been fiddling with 2.6.0RC0 to customise it for our purposes. I want
to remove the drop-down "map viewer" that appears in the main panel of the
main page because we won't use that function (ability to visualise data)
within geonetwork.
Unfortunately, while the rest of GeoNetwork is lovely and modifiable, that
particular feature seems to be pivotal to page layout. If I remove/rename
the line (specifically the "id" attribute):
         <div id="map_container" style="overflow:hidden; clear: both;">
Then not only does the bar map-bar disappear (good), but the entire page
completely loses its formatting (v. bad).

So the question is simple - is there a way to disable the drop-down map
without losing the formatting?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may
contain sensitive or protectively marked material up to RESTRICTED and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it, or
disclose it to anyone else. If you have received this transmission in error
please notify the sender immediately. All email traffic sent to or from us,
including without limitation all GCSX traffic, may be subject to recording
and/or monitoring in accordance with relevant legislation.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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,
Yep that did the job, thanks.
You probably know this already being apparently very familiar with the
code-base; when disabling the "where?" stuff/minimap in the left column
(for the possible config.xml option), as well as removing relevent lines,
you need to add a HTML hidden var to searchform_simple_template.xsl -
  <input type="hidden" class="content" id="region_simple"
name="region_simple" value=""/>

Around line 39ish in the RC0 code to replace the select that has to be
removed/hidden. Search doesn't work without that for some reason.
Cheers,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Hi Jonathan

The code i posted was to remove the big map. If you want to remove the where
section with the small maps, more changes are needed, like the one you
comment, as the region is a parameter send in the search so you'll need this
kind of stuff to get it working. Also javascript initialization for minimaps
can be removed then.

Not sure about the nature of your metadata, but if you remove the where
section in search and the metadata contains extent information you loose the
ability to search it.

Regards,
Jose Garcia

On Mon, Aug 2, 2010 at 8:59 AM, <jonathanmoules@anonymised.com> wrote:

Hi Jose,
Yep that did the job, thanks.
You probably know this already being apparently very familiar with the
code-base; when disabling the "where?" stuff/minimap in the left column (for
the possible config.xml option), as well as removing relevent lines, you
need to add a HTML hidden var to searchform_simple_template.xsl -
* <input type="hidden" class="content" id="region_simple"
name="region_simple" value=""/> *

Around line 39ish in the RC0 code to replace the select that has to be
removed/hidden. Search doesn't work without that for some reason.
Cheers,

Jonathan

This transmission is intended for the named addressee(s) only and may
contain sensitive or protectively marked material up to RESTRICTED and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it, or
disclose it to anyone else. If you have received this transmission in error
please notify the sender immediately. All email traffic sent to or from us,
including without limitation all GCSX traffic, may be subject to recording
and/or monitoring in accordance with relevant legislation.

Hi Jose,
That's fine, we're not including extent metadata at this point given
almost all of our data is for the same extent anyway (i.e. county wide). I
successfully commented-out the stuff for minimap/Where? parts, it was just
the big bar that was causing me issues. It was just that that "hidden"
variable missing was something of a "gotcha" so I thought you/others may
gain from knowing of it. But I've got all the spatial stuff turn off now
though which was the aim.
Thanks for the help,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.