Hi again,
I'm trying to customize GN so that the default search map that is displayed
is my own. This is the map that is displayed in the upper left corner of
the GN page, and is what is shown by default when clicking on the Open Map
Viewer link.
I've tried editing mapServers.xml in the mapContexts section, adding my URL,
e.g.,
<server
url="http://web.apps.state.nd.us/wmsconnector/com.esri.wms.Esrimap?ServiceName=NDWMS_GeneralInfo"
type="2" >
<layer name="Counties"></layer>
</server>
but when trying that my map does not show up. The spaces where the two maps
should be are blank.
I've been able to successfully add this URL to the mapservers section of
mapServers.xml and then displaying that data on the map, so I believe that
my WMS is working.
As a different approach, I've also tried to edit the info.xml, catalog.xml,
schema.xml files to serve up my local counties.shp as a local WMS from GN,
but I must have messed things up because GN does not start (java
exceptions).
What is the preferred method of creating one's own search map, using a local
.shp or using a WMS? I also need some help on how to do either step. I
haven't found any doco on this yet.
Thanks! Bob
--
View this message in context: http://www.nabble.com/Setting-the-default-search-map-tf4516979s18419.html#a12884293
Sent from the geonetwork-devel mailing list archive at Nabble.com.
Hi Bob,
Alle 19:15:01 di martedì 25 settembre 2007, Bob Nutsch ha scritto:
I've tried editing mapServers.xml in the mapContexts section,
You have to add your default layers in /config/mapContexts/default/
adding my URL, e.g.,
<server
url="http://web.apps.state.nd.us/wmsconnector/com.esri.wms.Esrimap?ServiceN
ame=NDWMS_GeneralInfo" type="2" >
<layer name="Counties"></layer>
</server>
Asking for a getCapabilities to
http://web.apps.state.nd.us/wmsconnector/com.esri.wms.Esrimap?
it returns, among the other info, this layer:
<Layer queryable="1">
<Name>COUNTIES</Name>
<Title>Counties</Title>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-104.0488944434" miny="45.9349761625"
maxx="-96.5544828294" maxy="49.000586313"/>
<ScaleHint min="0.00004205697249353754" max="99999999"/>
</Layer>
So, in your mapServers.xml entry, you have to edit the layer name
from "Counties" to "COUNTIES".
Ciao,
Emanuele
PS: a note not related to your problem: the getCapabilities document returned
by that server does not follow the WMS111 standard, because
its /WMT_MS_Capabilities/Service/Name text is "North Dakota WMS -
GeneralInfo" instead of a fixed "OGC:WMS".
Thank you very much Emanuele on pointing out the syntax issue, it is working now! Where do I set the default extents of the map so that it is "zoomed in" to the map extents? I have to manually zoom in to the extents of the map.
Thank you also for pointing out the need to use 'OGC:WMS' - I wasn't aware of that requirement. I will make the change in the near future.
Many thanks,
Bob
-----Original Message-----
From: geonetwork-devel-bounces@lists.sourceforge.net
[mailto:geonetwork-devel-bounces@lists.sourceforge.net] On
Behalf Of Emanuele Tajariol
Sent: Tuesday, September 25, 2007 2:41 PM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Setting the default search map
Hi Bob,
Alle 19:15:01 di martedì 25 settembre 2007, Bob Nutsch ha scritto:
> I've tried editing mapServers.xml in the mapContexts section,
You have to add your default layers in /config/mapContexts/default/
> adding my URL, e.g.,
>
> <server
>
>url="http://web.apps.state.nd.us/wmsconnector/com.esri.wms.Es
rimap?Serv
>iceN
>ame=NDWMS_GeneralInfo" type="2" >
> <layer name="Counties"></layer> </server>
Asking for a getCapabilities to
http://web.apps.state.nd.us/wmsconnector/com.esri.wms.Esrimap?
it returns, among the other info, this layer:
<Layer queryable="1">
<Name>COUNTIES</Name>
<Title>Counties</Title>
<SRS>EPSG:4326</SRS>
<LatLonBoundingBox minx="-104.0488944434"
miny="45.9349761625"
maxx="-96.5544828294" maxy="49.000586313"/>
<ScaleHint min="0.00004205697249353754" max="99999999"/>
</Layer>
So, in your mapServers.xml entry, you have to edit the layer
name from "Counties" to "COUNTIES".
Ciao,
Emanuele
PS: a note not related to your problem: the getCapabilities
document returned
by that server does not follow the WMS111 standard, because
its /WMT_MS_Capabilities/Service/Name text is "North Dakota WMS -
GeneralInfo" instead of a fixed "OGC:WMS".
--------------------------------------------------------------
-----------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork
Alle 21:52:52 di martedì 25 settembre 2007, Nutsch, Bob D. ha scritto:
Where do I set the default extents of the map so that it is
"zoomed in" to the map extents? I have to manually zoom in to the extents
of the map.
At the top of im_minimap.js you can find this line:
var im_mm_north, im_mm_east, im_mm_south, im_mm_west;
When these vars are undefined, the first image is zoomed at full extent.
You may want to set that line this way:
var im_mm_north=49, im_mm_east=-96, im_mm_south=46, im_mm_west=-105;
However, there are some issues on the AoI (the red-dot-bordered area in which
the metadata search is performed) that have to be fixed.
Ciao,
Emanuele
Hi Emanuele,
Thank you very much for that! I had looked at this file previously but it hadn't dawned on me to set the values in there. Works just fine now with the images, though I need to have some data in place to test the spatial extent search. What sort of issues need to be fixed for that?
I discovered that after setting the extents that if I click on the Reset link near the bottom of the map, below the Search button, the default "world" extents take over again. Must be another set of variables to be set?
Thank you again, I really do appreciate it.
Regards, Bob
-----Original Message-----
From: Emanuele Tajariol [mailto:e_tajariol@anonymised.com]
Sent: Tuesday, September 25, 2007 4:14 PM
To: Nutsch, Bob D.
Cc: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] Setting the default search
map -- initial extents
Alle 21:52:52 di martedì 25 settembre 2007, Nutsch, Bob D. ha scritto:
> Where do I set the default extents of the map so that it is "zoomed
>in" to the map extents? I have to manually zoom in to the
extents of
>the map.
At the top of im_minimap.js you can find this line:
var im_mm_north, im_mm_east, im_mm_south, im_mm_west;
When these vars are undefined, the first image is zoomed at
full extent.
You may want to set that line this way:
var im_mm_north=49, im_mm_east=-96, im_mm_south=46, im_mm_west=-105;
However, there are some issues on the AoI (the
red-dot-bordered area in which the metadata search is
performed) that have to be fixed.
Ciao,
Emanuele
Alle 23:34:43 di martedì 25 settembre 2007, Nutsch, Bob D. ha scritto:
Hi Emanuele,
Thank you very much for that! I had looked at this file previously but it
hadn't dawned on me to set the values in there. Works just fine now with
the images, though I need to have some data in place to test the spatial
extent search. What sort of issues need to be fixed for that?
With the changes suggested, the AoI is not computed properly, so its
geographic bounding box is wrong. Since the resulting MD are the ones with
bbox overlapping with the AoI, the geographic constraint is filtering the
wrong set of metadata.
However this holds only for the initial extents: as soon as you zoom or pan,
the new AoI is set properly (as you can see from the red-dotted bbox in the
minimap).
I discovered that after setting the extents that if I click on the Reset
link near the bottom of the map, below the Search button, the default
"world" extents take over again. Must be another set of variables to be
set?
Well, the reset feature does not take into account the fact that you may want
to return to a specific extent. 
Furthermore, you have more than one way to reset the map (you may also use the
reset button above the bigger map), and all of them should be changed
accordingly.
I don't know if the "reset to home" feature is planned in geonetwork.
Jeroen could give more info about this.
Ciao,
Emanuele
Thank you once again Emanuele for the info,
The "reset to home" option sounds like a good one. 
Best regards, Bob
-----Original Message-----
From: Emanuele Tajariol [mailto:e_tajariol@anonymised.com]
Sent: Tuesday, September 25, 2007 5:52 PM
To: Nutsch, Bob D.
Cc: geonetwork-devel@lists.sourceforge.net; Jeroen Ticheler
Subject: Re: [GeoNetwork-devel] Setting the default search
map -- initial extents
Alle 23:34:43 di martedì 25 settembre 2007, Nutsch, Bob D. ha scritto:
> Hi Emanuele,
>
> Thank you very much for that! I had looked at this file previously
> but it hadn't dawned on me to set the values in there. Works just
> fine now with the images, though I need to have some data
in place to
> test the spatial extent search. What sort of issues need
to be fixed for that?
With the changes suggested, the AoI is not computed properly,
so its geographic bounding box is wrong. Since the resulting
MD are the ones with bbox overlapping with the AoI, the
geographic constraint is filtering the wrong set of metadata.
However this holds only for the initial extents: as soon as
you zoom or pan, the new AoI is set properly (as you can see
from the red-dotted bbox in the minimap).
> I discovered that after setting the extents that if I click on the
> Reset link near the bottom of the map, below the Search button, the
> default "world" extents take over again. Must be another set of
> variables to be set?
Well, the reset feature does not take into account the fact
that you may want to return to a specific extent. 
Furthermore, you have more than one way to reset the map (you
may also use the reset button above the bigger map), and all
of them should be changed accordingly.
I don't know if the "reset to home" feature is planned in geonetwork.
Jeroen could give more info about this.
Ciao,
Emanuele