From: <jos...@us...> - 2011-05-16 20:13:39
|
Revision: 7719 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7719&view=rev Author: josegar74 Date: 2011-05-16 20:13:31 +0000 (Mon, 16 May 2011) Log Message: ----------- #463: Improvements in protocol/url handling for Interactive Map button Modified Paths: -------------- trunk/docs/eng/users/source/quickstartguide/new_metadata/index.rst trunk/web/src/main/webapp/loc/ar/xml/strings.xml trunk/web/src/main/webapp/loc/ca/xml/strings.xml trunk/web/src/main/webapp/loc/cn/xml/strings.xml trunk/web/src/main/webapp/loc/de/xml/strings.xml trunk/web/src/main/webapp/loc/en/xml/strings.xml trunk/web/src/main/webapp/loc/es/xml/strings.xml trunk/web/src/main/webapp/loc/fr/xml/strings.xml trunk/web/src/main/webapp/loc/nl/xml/strings.xml trunk/web/src/main/webapp/loc/no/xml/strings.xml trunk/web/src/main/webapp/loc/pt/xml/strings.xml trunk/web/src/main/webapp/loc/ru/xml/strings.xml trunk/web/src/main/webapp/scripts/map/core/CatalogueInterface.js trunk/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js trunk/web/src/main/webapp/xml/schemas/iso19115/present/metadata-iso19115.xsl trunk/web/src/main/webapp/xml/schemas/iso19139/present/metadata-iso19139.xsl Modified: trunk/docs/eng/users/source/quickstartguide/new_metadata/index.rst =================================================================== --- trunk/docs/eng/users/source/quickstartguide/new_metadata/index.rst 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/docs/eng/users/source/quickstartguide/new_metadata/index.rst 2011-05-16 20:13:31 UTC (rev 7719) @@ -245,41 +245,31 @@ 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. .. figure:: onlineResourceWebMapService2.png *WMS online resource* - + The *Interactive Map* button opens a window to select the layer/s defined in WMS capabilities document to load in map viewer. .. figure:: onlineResourceWebMapService2SelectLayer.png *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: trunk/web/src/main/webapp/loc/ar/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/ar/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/ar/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -701,6 +701,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> @@ -1217,4 +1218,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/ca/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/ca/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/ca/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -544,6 +544,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">Servei Capabilities OGC-WMS (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> @@ -1051,4 +1052,6 @@ <cswServerFees>Tarifes</cswServerFees> <cswServerAccessConstraints>Restriccions d'accés</cswServerAccessConstraints> <cswServerContact>Contacte</cswServerContact> + + <wmslayers>Capes WMS</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/cn/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/cn/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/cn/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -699,6 +699,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> @@ -1208,4 +1209,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/de/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/de/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/de/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -696,6 +696,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> @@ -1202,4 +1203,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/en/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/en/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/en/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -698,6 +698,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> @@ -1211,4 +1212,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/es/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/es/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/es/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -698,6 +698,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> @@ -1208,4 +1209,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>Capas WMS</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/fr/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/fr/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/fr/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -701,6 +701,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> @@ -1227,4 +1228,6 @@ <cswServerFees>Frais</cswServerFees> <cswServerAccessConstraints>Contraintes d'accès</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/nl/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/nl/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/nl/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -708,6 +708,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">Bestand ter download dmv FTP</protocolChoice> @@ -1228,4 +1229,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/no/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/no/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/no/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -620,6 +620,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> @@ -1120,4 +1121,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/pt/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/pt/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/pt/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -698,6 +698,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> @@ -1215,4 +1216,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/loc/ru/xml/strings.xml =================================================================== --- trunk/web/src/main/webapp/loc/ru/xml/strings.xml 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/loc/ru/xml/strings.xml 2011-05-16 20:13:31 UTC (rev 7719) @@ -703,6 +703,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> @@ -1215,5 +1216,6 @@ <cswServerFees>Fees</cswServerFees> <cswServerAccessConstraints>Access constraints</cswServerAccessConstraints> <cswServerContact>Contact</cswServerContact> - + + <wmslayers>WMS layers</wmslayers> </strings> Modified: trunk/web/src/main/webapp/scripts/map/core/CatalogueInterface.js =================================================================== --- trunk/web/src/main/webapp/scripts/map/core/CatalogueInterface.js 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/scripts/map/core/CatalogueInterface.js 2011-05-16 20:13:31 UTC (rev 7719) @@ -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: trunk/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js =================================================================== --- trunk/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/scripts/map/widgets/tree/WMSTreeGenerator.js 2011-05-16 20:13:31 UTC (rev 7719) @@ -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: trunk/web/src/main/webapp/xml/schemas/iso19115/present/metadata-iso19115.xsl =================================================================== --- trunk/web/src/main/webapp/xml/schemas/iso19115/present/metadata-iso19115.xsl 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/xml/schemas/iso19115/present/metadata-iso19115.xsl 2011-05-16 20:13:31 UTC (rev 7719) @@ -1003,6 +1003,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="."> @@ -1044,6 +1045,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> @@ -1073,8 +1093,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> @@ -1809,6 +1832,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> @@ -1827,6 +1862,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: trunk/web/src/main/webapp/xml/schemas/iso19139/present/metadata-iso19139.xsl =================================================================== --- trunk/web/src/main/webapp/xml/schemas/iso19139/present/metadata-iso19139.xsl 2011-05-16 18:56:44 UTC (rev 7718) +++ trunk/web/src/main/webapp/xml/schemas/iso19139/present/metadata-iso19139.xsl 2011-05-16 20:13:31 UTC (rev 7719) @@ -2655,6 +2655,7 @@ <xsl:with-param name="schema" select="$schema"/> </xsl:apply-templates> </xsl:when> + <!-- Resource name is specified --> <xsl:when test="//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="."> @@ -2707,6 +2708,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> @@ -2737,8 +2757,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> @@ -3098,6 +3121,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> @@ -3119,6 +3154,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:addWMSServerLayers("' , $linkage , '")' )"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |