[mapguide-commits] r9248 - sandbox/jng/ogc/Server/src/Wms
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Nov 10 07:54:55 PST 2017
Author: jng
Date: 2017-11-10 07:54:55 -0800 (Fri, 10 Nov 2017)
New Revision: 9248
Modified:
sandbox/jng/ogc/Server/src/Wms/1.0.0.xml.awd
Log:
- Port GeoJSON and geometry templates over to 1.1.0.xml.awd
- Port over base GetFeatureInfo HTML template from 1.1.0 template to 1.0.0 template (1.1.0 had html.stylesheet, 1.0.0 did not)
Modified: sandbox/jng/ogc/Server/src/Wms/1.0.0.xml.awd
===================================================================
--- sandbox/jng/ogc/Server/src/Wms/1.0.0.xml.awd 2017-11-10 15:49:12 UTC (rev 9247)
+++ sandbox/jng/ogc/Server/src/Wms/1.0.0.xml.awd 2017-11-10 15:54:55 UTC (rev 9248)
@@ -75,6 +75,7 @@
<FeatureInfo>
<?Endif?>
<?EnumFeatureProperties using="&FeatureProperty.xml;" ?>
+ <?EnumFeatureGeometries using="&FeatureGeometry.xml;" ?>
</FeatureInfo>
</Define>
@@ -83,6 +84,7 @@
<td>
<table>
<?EnumFeatureProperties using="&FeatureProperty.html;" ?>
+ <?EnumFeatureGeometries using="&FeatureGeometry.html;" ?>
</table>
</td>
</tr>
@@ -91,9 +93,19 @@
<Define item="FeatureInfo.text">
FeatureInfo:
<?EnumFeatureProperties using="&FeatureProperty.text;" ?>
+ <?EnumFeatureGeometries using="&FeatureGeometry.text;" ?>
</Define>
+ <!--
+ Ugly, but we have to do 2 iteration passes to output the right
+ content in the right places for GeoJSON
+ -->
+ <Define item="FeatureInfo.json">{
+ "type": "Feature",
+ "properties": {<?EnumFeatureProperties using="&FeatureProperty.json;" ?>},
+ "geometry": <?EnumFeatureGeometries using="&FeatureGeometry.json;" ?>
+}</Define>
<Define item="FeatureProperty.xml">
<Property name="&FeatureProperty.Name;" value="&FeatureProperty.Value;"></Property>
</Define>
@@ -117,7 +129,25 @@
<Define item="Layer.Title">(Untitled Layer)</Define>
<Define item="Layer.Abstract"></Define>
<Define item="Layer.Name"></Define>
+ <!-- Output all non-geometry properties -->
+ <Define item="FeatureProperty.json">"&FeatureProperty.Name;": "&FeatureProperty.Value;"<?If l="&FeatureProperty.IsLast" op="eq" r="0"?>,<?Endif?></Define>
+ <!-- Only output if property name is the designated geometry -->
+ <Define item="FeatureGeometry.json">&FeatureGeometry.Value;</Define>
+
+ <!-- Only output if property name is the designated geometry -->
+ <Define item="FeatureGeometry.text">Geometry=&FeatureGeometry.Value;</Define>
+
+ <!-- Only output if property name is the designated geometry -->
+ <Define item="FeatureGeometry.html">
+ <tr><td class="name">Geometry</td><td>&FeatureGeometry.Value;</td></tr>
+ </Define>
+
+ <!-- Only output if property name is the designated geometry -->
+ <Define item="FeatureGeometry.xml">
+ <Property name="Geometry" value="&FeatureGeometry.Value;"></Property>
+ </Define>
+
<!-- We're currently not supporting child layers... -->
<Define item="Layer.Sublayers"></Define>
@@ -355,9 +385,10 @@
<html>
<head>
<title>GetFeatureInfo</title>
+&html.stylesheet;
</head>
<body>
-<table border="1">
+<table>
<?EnumFeatureInfo using="&FeatureInfo.html;" ?>
</table>
</body>
@@ -374,7 +405,15 @@
<?EnumFeatureInfo using="&FeatureInfo.text;" ?>
</Response>
+<!--
+ WMS GetFeatureInfo - (Geo)JSON
+
+-->
+<Response request="GetFeatureInfo" content-type="application/json">
+ <?EnumFeatureInfo using="&FeatureInfo.json;" ?>
+</Response>
+
<!--
Exception format - XML
More information about the mapguide-commits
mailing list