Hello,
In the classic GeoNetwork search interface, users had two additional options
in map searching that are not present in the new gui widgets interface.
First selecting extent by placenames dropdown and second was the overlay
option (Within, overlap exclude, etc.). Are their any plans to include this
fuNctionality in the new interface? If no one else is working on this, I am
thinking of porting over this functionality for some projects I am working
on (if I can find the time).
Any comments or advise?
Cheers,
Byron Cochrane
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Map-overlay-and-select-extents-by-name-in-new-search-gui-tp4874617p4874617.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
Hi Byron,
Le 13 avril 2012 03:45, ByronCinNZ <cochranes4@anonymised.com> a écrit :
Hello,
In the classic GeoNetwork search interface, users had two additional options
in map searching that are not present in the new gui widgets interface.
First selecting extent by placenames dropdown and second was the overlay
option (Within, overlap exclude, etc.). Are their any plans to include this
fuNctionality in the new interface?
More or less all you the basis are here.
See [1] where you can choose to display the relation field or not, for example:
GeoNetwork.util.SearchFormTools.getSimpleMap(
GeoNetwork.map.BACKGROUND_LAYERS,
GeoNetwork.map.MAP_OPTIONS,
false, undefined, true)
And [2] to get the region in a datastore which could be used to
populate a combo. Maybe it could be merge with the extent editor which
is almost the same. See map.ExtentMap#createRegionMenu(cb)
It could be nice also to use thesaurus of type place also instead of
the Regions table for this.
HTH.
Francois
[1] http://geonetwork-opensource.org/manuals/trunk/eng/widgets/lib/web-client/jst/GeoNetwork/util/SearchFormTools.html#GeoNetwork.util.SearchFormTools.getSimpleMap
[2] http://geonetwork-opensource.org/manuals/trunk/eng/widgets/lib/web-client/jst/GeoNetwork/data/RegionStore.html
If no one else is working on this, I am
thinking of porting over this functionality for some projects I am working
on (if I can find the time).
Any comments or advise?
Cheers,
Byron Cochrane
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Map-overlay-and-select-extents-by-name-in-new-search-gui-tp4874617p4874617.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
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
Hi Francois,
I managed to get most of what I wanted with your advice.
Adding the overlay option was simple enough as you said. To make it an
option I utilized the /withRelation/ variable in geonetwork.js by adding the
following:
- To .../apps/search/js/maps/settings.js I added the line:
/GeoNetwork.map.WITH_RELATION=true;/
- To .../apps/js/geonetwork.js at about line 22252 I added the line
/withRelation=GeoNetwork.map.WITH_RELATION/
after the line /var a = ;/
Adding the dropdown for regions was a little more complicated - partly
because the existing code was broken due to the 3 letter language code
change which made the call to OpenLayers.Bounds unworkable since this
returns 2 letter codes. Anyway my fix involved copying the block of code
that creates the dropdown in
..\apps\js\GeoNetwork\lib\GeoNetwork\map\extentMap.js to
...\apps\js\GeoNetwork\lib\GeoNetwork\form\GeometryMapFields.js.
And then adding some code to link to existing functions to make the
selection create the right actions.
The patch for ..\apps\js\GeoNetwork\lib\GeoNetwork\form\GeometryMapFields.js
is attached.
http://osgeo-org.1560.n6.nabble.com/file/n4888674/GeometryMapField.js.patch
GeometryMapField.js.patch
Right now this fix hard codes the use of English because of the change I
needed to make to the OpenLayers.Bounds call. I have not determined how to
retrieve the default language setting???
I did not get far on using thesaurus of type place for this. I would like to
confer with Simon on this point as I think he may have put some thought to
this. This ability would be very useful to me.
Cheers,
Byron
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Map-overlay-and-select-extents-by-name-in-new-search-gui-tp4874617p4888674.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
A correction to my last email -
It is the OpenLayers.Lang.getCode() that returns to the two letter codes.
This call is present in ExtentMap.js.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Map-overlay-and-select-extents-by-name-in-new-search-gui-tp4874617p4889063.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
Hmmm, Should always remember to test my patches before posting ....
So I did my testing on app-mini.js and it seems I did not port the changes
properly.
This is the proper procedure to add the placename dropdown and overlay
options -
- To .../apps/search/js/maps/settings.js I added the line:
GeoNetwork.map.WITH_RELATION=true; Setting this to false will
remove this display.
- To .../apps/js/geonetwork/lib/GeoNetwork/util/SearchFormTools.js at about
line 53 I added the line
withRelation=GeoNetwork.map.WITH_RELATION
after the line var a = ; (I previously said incorrectly to add
this line to the GeoNetwork.js file.)
- Patch ..\apps\js\GeoNetwork\lib\GeoNetwork\form\GeometryMapFields.js with
the attached patchfile
(includes three letter langauge code support).
http://osgeo-org.1560.n6.nabble.com/file/n4896250/GeometryMapField.js.patch
GeometryMapField.js.patch
Cheers,
Byron
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Map-overlay-and-select-extents-by-name-in-new-search-gui-tp4874617p4896250.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.