From: <jos...@us...> - 2011-05-16 18:56:52
|
Revision: 7718 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7718&view=rev Author: josegar74 Date: 2011-05-16 18:56:44 +0000 (Mon, 16 May 2011) Log Message: ----------- #463: Improvements in protocol/url handling for Interactive Map button Modified Paths: -------------- branches/2.6.x/docs/eng/users/source/quickstartguide/new_metadata/index.rst branches/2.6.x/web/src/main/webapp/loc/ar/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/ca/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/cn/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/de/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/en/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/es/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/fr/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/nl/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/pt/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/ru/xml/strings.xml branches/2.6.x/web/src/main/webapp/loc/tr/xml/strings.xml branches/2.6.x/web/src/main/webapp/scripts/map/core/CatalogueInterface.js branches/2.6.x/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19115.xsl branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19139.xsl Modified: branches/2.6.x/docs/eng/users/source/quickstartguide/new_metadata/index.rst =================================================================== --- branches/2.6.x/docs/eng/users/source/quickstartguide/new_metadata/index.rst 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/docs/eng/users/source/quickstartguide/new_metadata/index.rst 2011-05-16 18:56:44 UTC (rev 7718) @@ -245,19 +245,9 @@ Metadata records in ISO19139 could be related to resources defined in WMS services. When searching metadata that has related WMS online resources, the *Interactive Map* button is displayed to load the WMS layer/s in the map viewer. A WMS online resource can be referenced in metadata like: -- Selecting protocol **OGC Web Map Service 1.1.1** or **OGC Web Map Service 1.3.0**: -#. *URL*: Url of WMS service -#. *Name of the resource*: WMS layer name +- Selecting protocol **OCG-WMS Web Map Capabilities 1.1.1** or **OCG-WMS Web Map Capabilities 1.3.0**: -.. figure:: onlineResourceWebMapService1.png - - *WMS online resource* - -In this case the *Interactive Map* button, loads directly the referenced layer in the the map viewer. - -- Selecting protocol **OCG-WMS Web Map Capabilities** service: - #. *URL*: Url of WMS service #. Name of the resource: empty. @@ -271,15 +261,15 @@ *Window to select WMS layer/s referenced in online resource to load in map viewer* -- Selecting protocol **OGC-WMS Web Map Service** (no version): +- Selecting protocols **OGC-WMS Web Map Service**, **OGC Web Map Service 1.1.1** or **OGC Web Map Service 1.3.0**: #. *URL*: Url of WMS service #. *Name of the resource*: WMS layer name (optional) -.. figure:: onlineResourceWebMapService3.png +.. figure:: onlineResourceWebMapService1.png - *WMS online resource* - + *WMS online resource* + The behaviour the *Interactive Map* button depends if user indicated the layer name in the field *Name of the resource* or not, to show the window to select the layer/s to load in map viewer or load the layer directly. Modified: branches/2.6.x/web/src/main/webapp/loc/ar/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/ar/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/ar/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -554,6 +554,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Service</protocolChoice> @@ -1070,4 +1071,5 @@ <custom-elementset-revert>العودة إلى ElementSetName الافتراضي الردود = كامل، وحذف كل العناصر من هذه القائمة.</custom-elementset-revert> <custom-elementset-add>إضافة عنصر</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/ca/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/ca/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/ca/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -687,6 +687,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">Servei de Mapes OGC-WMS</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">Servei Capabilities OGC-WMS (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">Servei de Mapes OGC-WMS (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">Servei de Mapes OGC-WMS (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Service</protocolChoice> @@ -1202,4 +1203,5 @@ <custom-elementset-revert>Per tornar a la ElementSetName default = respostes completes, eliminar tots els elements d'aquesta llista.</custom-elementset-revert> <custom-elementset-add>Afegeix element</custom-elementset-add> + <wmslayers>Capes WMS</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/cn/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/cn/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/cn/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -550,6 +550,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities服务 (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities服务 (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC-WMS地图服务(ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC-WMS地图服务(ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="WWW:DOWNLOAD-1.0-ftp--download">下载文件 (FTP)</protocolChoice> @@ -1059,4 +1060,5 @@ <custom-elementset-revert>要恢复到默认ElementSetName=充分的答复,请删除此列表的所有元素。</custom-elementset-revert> <custom-elementset-add>添加元素</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/de/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/de/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/de/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -550,6 +550,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="WWW:DOWNLOAD-1.0-ftp--download">Datei via FTP zum download</protocolChoice> @@ -1054,4 +1055,5 @@ <custom-elementset-revert>Um wieder auf den Standardwert ElementSetName = FULL Antworten, löschen Sie alle Elemente aus dieser Liste.</custom-elementset-revert> <custom-elementset-add>Element hinzufügen</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/en/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/en/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/en/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -550,6 +550,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Service</protocolChoice> @@ -1064,4 +1065,5 @@ <custom-elementset-revert>To revert to the default ElementSetName=FULL responses, delete all elements from this list.</custom-elementset-revert> <custom-elementset-add>Add element</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/es/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/es/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/es/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -550,6 +550,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">Sevicio de Mapas OGC-WMS</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">Servicio Capabilities OGC-WMS (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">Servicio Capabilities OGC-WMS (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">Sevicio de Mapas OGC-WMS (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">Sevicio de Mapas OGC-WMS (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="WWW:DOWNLOAD-1.0-ftp--download">Fichero para la descarga (FTP)</protocolChoice> @@ -1060,4 +1061,5 @@ <custom-elementset-revert>Para volver a la ElementSetName default = respuestas completas, eliminar todos los elementos de esta lista.</custom-elementset-revert> <custom-elementset-add>Añadir elemento</custom-elementset-add> + <wmslayers>Capas WMS</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/fr/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/fr/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/fr/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -553,6 +553,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Service</protocolChoice> @@ -1079,4 +1080,5 @@ <custom-elementset-revert>Pour revenir à la valeur par défaut = ElementSetName des réponses complètes, supprimer tous les éléments de cette liste.</custom-elementset-revert> <custom-elementset-add>Ajouter un élément</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/nl/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/nl/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/nl/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -561,6 +561,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="WWW:DOWNLOAD-1.0-ftp--download">Bestand ter download dmv FTP</protocolChoice> @@ -1081,4 +1082,5 @@ <custom-elementset-revert>Om terug te keren naar de standaard ElementSetName = VOL reacties, verwijder alle elementen uit deze lijst.</custom-elementset-revert> <custom-elementset-add>Toe te voegen element</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/pt/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/pt/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/pt/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -551,6 +551,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities Service (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Service (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Service (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Service</protocolChoice> @@ -1068,4 +1069,5 @@ <custom-elementset-revert>Para reverter para a ElementSetName default = respostas completas, apagar todos os elementos desta lista.</custom-elementset-revert> <custom-elementset-add>Adicionar elemento</custom-elementset-add> + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/ru/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/ru/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/ru/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -549,6 +549,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">Cервис OGC Web Map Service</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">Сервис OGC-WMS Capabilities service(версия 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">Сервис OGC-WMS Capabilities service(версия 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">Cервис OGC Web Map Service (версия 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">Cервис OGC Web Map Service (версия 1.3.0)</protocolChoice> <protocolChoice show="-" value="WWW:DOWNLOAD-1.0-ftp--download">Файл для загрузки по FTP</protocolChoice> @@ -1060,5 +1061,6 @@ <custom-elementset-intro>Определить элементы должны быть включены в пользовательский набор элементов здесь. Каждый элемент должен быть идентифицирован по полной XPATH от корня документа. Эти элементы и их потомки будут включены в ответах на запросы КПЖ GetRecord с ElementSetName = FULL.</custom-elementset-intro> <custom-elementset-revert>Чтобы вернуться к умолчанию ElementSetName = полные ответы, удалить все элементы из этого списка.</custom-elementset-revert> <custom-elementset-add>Добавить элемент</custom-elementset-add> - + + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/loc/tr/xml/strings.xml =================================================================== --- branches/2.6.x/web/src/main/webapp/loc/tr/xml/strings.xml 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/loc/tr/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) @@ -552,6 +552,7 @@ <protocolChoice show="y" value="OGC:WMC-1.1.0-http-get-capabilities">OGC-WMC Web Map Context (ver 1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS">OGC-WMS Web Map Servisi</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-capabilities">OGC-WMS Capabilities Servisi (ver 1.1.1)</protocolChoice> + <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-capabilities">OGC-WMS Capabilities Servisi (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.1.1-http-get-map">OGC Web Map Servisi (ver 1.1.1)</protocolChoice> <protocolChoice show="-" value="OGC:WMS-1.3.0-http-get-map">OGC Web Map Servisi (ver 1.3.0)</protocolChoice> <protocolChoice show="-" value="OGC:WNS">OGC-WNS Web Notification Servisi</protocolChoice> @@ -1074,5 +1075,5 @@ <custom-elementset-revert>Varsayılan ElementSetName=FULL cevaplarına geri dönebilmek için, bu listeden bütün elemanları siliniz.</custom-elementset-revert> <custom-elementset-add>Eleman Ekle</custom-elementset-add> - + <wmslayers>WMS layers</wmslayers> </strings> Modified: branches/2.6.x/web/src/main/webapp/scripts/map/core/CatalogueInterface.js =================================================================== --- branches/2.6.x/web/src/main/webapp/scripts/map/core/CatalogueInterface.js 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/scripts/map/core/CatalogueInterface.js 2011-05-16 18:56:44 UTC (rev 7718) @@ -189,8 +189,15 @@ var onlineResource = layerList[0][1]; layers = layerList; + var containsVersion = (onlineResource.indexOf('version=') > -1); + var params = {'service': 'WMS', 'request': 'GetCapabilities', - 'version': GeoNetwork.OGCUtil.getProtocolVersion(), language: GeoNetwork.OGCUtil.getLanguage()}; + language: GeoNetwork.OGCUtil.getLanguage()}; + + if (!containsVersion) { + params['version'] = GeoNetwork.OGCUtil.getProtocolVersion(); + } + var paramString = OpenLayers.Util.getParameterString(params); var separator = (onlineResource.indexOf('?') > -1) ? '&' : '?'; onlineResource += separator + paramString; Modified: branches/2.6.x/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js =================================================================== --- branches/2.6.x/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js 2011-05-16 18:56:44 UTC (rev 7718) @@ -79,9 +79,15 @@ * onlineResource - {String} the online resource / base url of the WMS */ loadWMS: function(onlineResource) { + var containsVersion = (onlineResource.indexOf('version=') > -1); + var params = {'service': 'WMS', 'request': 'GetCapabilities', - 'version': GeoNetwork.OGCUtil.getProtocolVersion(), language: GeoNetwork.OGCUtil.getLanguage()}; + language: GeoNetwork.OGCUtil.getLanguage()}; + if (!containsVersion) { + params['version'] = GeoNetwork.OGCUtil.getProtocolVersion(); + } + var paramString = OpenLayers.Util.getParameterString(params); var separator = (onlineResource.indexOf('?') > -1) ? '&' : '?'; onlineResource += separator + paramString; Modified: branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19115.xsl =================================================================== --- branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19115.xsl 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19115.xsl 2011-05-16 18:56:44 UTC (rev 7718) @@ -977,6 +977,7 @@ <xsl:with-param name="schema" select="$schema"/> </xsl:apply-templates> </xsl:when> + <!-- Resource name is specified --> <xsl:when test="string(../../../geonet:info/dynamic)='true' and string($name)!='' and string($linkage)!=''"> <!-- Create a link for a WMS service that will open in InterMap opensource --> <xsl:apply-templates mode="simpleElement" select="."> @@ -1018,6 +1019,25 @@ </xsl:with-param> </xsl:apply-templates> </xsl:when> + <!-- Resource name is NOT specified --> + <xsl:when test="string(../../../geonet:info/dynamic)='true' and string($linkage)!='' and not(string($name))"> + <xsl:apply-templates mode="simpleElement" select="."> + <xsl:with-param name="schema" select="$schema"/> + <xsl:with-param name="title" select="/root/gui/strings/interactiveMap"/> + <xsl:with-param name="text"> + <a href="javascript:addWMSServerLayers('{$linkage}')" title="{/root/strings/interactiveMap}"> + <xsl:choose> + <xsl:when test="string($description)!=''"> + <xsl:value-of select="$description"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/root/gui/strings/wmslayers"/> + </xsl:otherwise> + </xsl:choose> + </a> + </xsl:with-param> + </xsl:apply-templates> + </xsl:when> </xsl:choose> </xsl:template> @@ -1047,8 +1067,11 @@ <xsl:when test="string($description)!=''"> <xsl:value-of select="$description"/> </xsl:when> + <xsl:when test="string($name)!=''"> + <xsl:value-of select="$name"/> + </xsl:when> <xsl:otherwise> - <xsl:value-of select="$name"/> + <xsl:value-of select="/root/gui/strings/wmslayers"/> </xsl:otherwise> </xsl:choose> </a> @@ -1840,6 +1863,18 @@ <!-- The old links still in use by some systems. Deprecated --> <xsl:comment>The use of these links should be a</xsl:comment> <xsl:choose> + <!-- no protocol, but URL is for a WMS service --> + <xsl:when test="(not(string(./protocol)) and contains($linkage,'service=WMS') and not(string($name)))"> + <link type="wms"> + <xsl:value-of select="concat('javascript:addWMSServerLayers("' , $linkage , '")' )"/> + </link> + </xsl:when> + <!-- no protocol, but URL is for a WMS service --> + <xsl:when test="(not(string(./protocol)) and contains($linkage,'service=WMS') and string($name)!='')"> + <link type="wms"> + <xsl:value-of select="concat('javascript:addWMSLayer([["' , $name , '","' , $linkage , '", "', $name ,'","',$id,'"]])')"/> + </link> + </xsl:when> <xsl:when test="starts-with(./protocol,'WWW:DOWNLOAD-') and contains(./protocol,'http--download') and string($linkage)!='' and not(contains($linkage,$download_check))"> <!-- FIXME --> <link type="download"><xsl:value-of select="$linkage"/></link> </xsl:when> @@ -1858,6 +1893,11 @@ <xsl:value-of select="concat(/root/gui/locService,'/google.kml?uuid=',$uuid,'&layers=',$name)"/> </link> </xsl:when> + <xsl:when test="(starts-with(./protocol,'OGC:WMS-') and contains(./protocol,'-get-map') and string($linkage)!='' and not(string($name))) or ($protocol = 'OGC:WMS' and string($linkage)!='' and not(string($name)))"> + <link type="wms"> + <xsl:value-of select="concat('javascript:addWMSServerLayers("' , $linkage , '")' )"/> + </link> + </xsl:when> <xsl:when test="(starts-with(./protocol,'OGC:WMS-') and contains(./protocol,'-get-capabilities') and string($linkage)!='') or ($protocol = 'OGC:WMS' and string($name)='' and string($linkage)!='')"> <link type="wms"> <xsl:value-of select="concat('javascript:addWMSServerLayers("' , $linkage , '")' )"/> Modified: branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19139.xsl =================================================================== --- branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19139.xsl 2011-05-16 13:49:59 UTC (rev 7717) +++ branches/2.6.x/web/src/main/webapp/xsl/metadata-iso19139.xsl 2011-05-16 18:56:44 UTC (rev 7718) @@ -2441,6 +2441,7 @@ <xsl:with-param name="schema" select="$schema"/> </xsl:apply-templates> </xsl:when> + <!-- Resource name is specified --> <xsl:when test="string(//geonet:info/dynamic)='true' and string($name)!='' and string($linkage)!=''"> <!-- Create a link for a WMS service that will open in InterMap opensource --> <xsl:apply-templates mode="simpleElement" select="."> @@ -2493,6 +2494,25 @@ </xsl:with-param> </xsl:apply-templates> </xsl:when> + <!-- Resource name is NOT specified --> + <xsl:when test="string(//geonet:info/dynamic)='true' and string($linkage)!='' and not(string($name))"> + <xsl:apply-templates mode="simpleElement" select="."> + <xsl:with-param name="schema" select="$schema"/> + <xsl:with-param name="title" select="/root/gui/strings/interactiveMap"/> + <xsl:with-param name="text"> + <a href="javascript:addWMSServerLayers('{$linkage}')" title="{/root/strings/interactiveMap}"> + <xsl:choose> + <xsl:when test="string($description)!=''"> + <xsl:value-of select="$description"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/root/gui/strings/wmslayers"/> + </xsl:otherwise> + </xsl:choose> + </a> + </xsl:with-param> + </xsl:apply-templates> + </xsl:when> </xsl:choose> </xsl:template> @@ -2523,8 +2543,11 @@ <xsl:when test="string($description)!=''"> <xsl:value-of select="$description"/> </xsl:when> + <xsl:when test="string($name)!=''"> + <xsl:value-of select="$name"/> + </xsl:when> <xsl:otherwise> - <xsl:value-of select="$name"/> + <xsl:value-of select="/root/gui/strings/wmslayers"/> </xsl:otherwise> </xsl:choose> </a> @@ -2848,6 +2871,18 @@ <!-- The old links still in use by some systems. Deprecated --> <xsl:choose> + <!-- no protocol, but URL is for a WMS service --> + <xsl:when test="(not(string($protocol)) and contains($linkage,'service=WMS') and not(string($name)))"> + <link type="wms"> + <xsl:value-of select="concat('javascript:addWMSServerLayers("' , $linkage , '")' )"/> + </link> + </xsl:when> + <!-- no protocol, but URL is for a WMS service --> + <xsl:when test="(not(string($protocol)) and contains($linkage,'service=WMS') and string($name)!='')"> + <link type="wms"> + <xsl:value-of select="concat('javascript:addWMSLayer([["' , $name , '","' , $linkage , '", "', $name ,'","',$id,'"]])')"/> + </link> + </xsl:when> <xsl:when test="starts-with($protocol,'WWW:DOWNLOAD-') and contains($protocol,'http--download') and not(contains($linkage,$download_check))"> <link type="download"><xsl:value-of select="$linkage"/></link> </xsl:when> @@ -2869,6 +2904,12 @@ <xsl:value-of select="concat(/root/gui/locService,'/google.kml?uuid=',$uuid,'&layers=',$name)"/> </link> </xsl:when> + <xsl:when test="(starts-with($protocol,'OGC:WMS-') and contains($protocol,'-get-map') and string($linkage)!='' and not(string($name))) or ($protocol = 'OGC:WMS' and string($linkage)!='' and not(string($name)))"> + <link type="wms"> + <!--xsl:value-of select="concat('javascript:runIM_selectService("' , $linkage , '", 2,',$id,')' )"/--> + <xsl:value-of select="concat('javascript:addWMSServerLayers("' , $linkage , '")' )"/> + </link> + </xsl:when> <xsl:when test="(starts-with($protocol,'OGC:WMS-') and contains($protocol,'-get-capabilities') and string($linkage)!='') or ($protocol = 'OGC:WMS' and string($name)='' and string($linkage)!='')"> <link type="wms"> <!--xsl:value-of select="concat('javascript:runIM_selectService("' , $linkage , '", 2,',$id,')' )"/--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |