[mapguide-commits] r7476 - sandbox/jng/queryfeatures_v2/Doc/viewerapi

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 6 03:37:11 PDT 2013


Author: jng
Date: 2013-05-06 03:37:11 -0700 (Mon, 06 May 2013)
New Revision: 7476

Modified:
   sandbox/jng/queryfeatures_v2/Doc/viewerapi/index.htm
Log:
Update AJAX viewer API docs

Modified: sandbox/jng/queryfeatures_v2/Doc/viewerapi/index.htm
===================================================================
--- sandbox/jng/queryfeatures_v2/Doc/viewerapi/index.htm	2013-05-06 10:36:35 UTC (rev 7475)
+++ sandbox/jng/queryfeatures_v2/Doc/viewerapi/index.htm	2013-05-06 10:37:11 UTC (rev 7476)
@@ -69,7 +69,9 @@
       <LI><A href="#mapframe_getmapwidth">GetMapWidth</A></LI>
       <LI><A href="#mapframe_getmetersperunit">GetMetersPerUnit</A></LI>
       <LI><A href="#mapframe_getscale">GetScale</A></LI>
+      <LI><A href="#mapframe_getselectedbounds">GetSelectedBounds</A></LI>
       <LI><A href="#mapframe_getselectedcount">GetSelectedCount</A></LI>
+      <LI><A href="#mapframe_getselectedfeatures">GetSelectedFeatures</A></LI>
       <LI><A href="#mapframe_getselectedlayers">GetSelectedLayers</A></LI>
       <LI><A href="#mapframe_getselectionxml">GetSelectionXML</A></LI>
       <LI><A href="#mapframe_getsessionid">GetSessionId</A></LI>
@@ -842,11 +844,74 @@
   </DL>
 
   <DL>
+    <DT><STRONG><A name="mapframe_getselectedbounds">GetSelectedBounds()</A></STRONG></DT>
+      <DD>
+      Returns the bounding box of the selected features. Returns null if no features are selected. The box is a <CODE>Bounds</CODE> object:
+<PRE>Bounds {
+  minx; /* The min x coordinate of this bounding box */
+  miny; /* The min y coordinate of this bounding box */
+  maxx; /* The max x coordinate of this bounding box */
+  maxy; /* The max y coordinate of this bounding box */
+}
+</PRE>
+      </DD>
+  </DL>
+
+  <DL>
     <DT><STRONG><A name="mapframe_getselectedcount">GetSelectedCount()</A></STRONG></DT>
       <DD>
       Returns the number of features that are currently selected.
       </DD>
   </DL>
+  
+  <DL>
+    <DT><STRONG><A name="mapframe_getselectedfeatures">GetSelectedFeatures()</A></STRONG></DT>
+      <DD>
+      Returns the selection set including attributes of selected features. The selection set is structured like so:
+<PRE>{
+    layerName1 : [
+    { //feature 1 in layerName1
+        values: [
+            { name: "attribute1", value: "value1" },
+            { name: "attribute2", value: "value2" },
+            { name: "attribute3", value: "value3" },
+            ...
+            { name: "attributeN", value: "valueN" }
+        ]
+        zoom: { minx: <feature1_bbox_minx>, miny: <feature1_bbox_miny>, maxx: <feature1_bbox_maxx>, maxy: <feature1_bbox_maxy> }
+    },
+    { //feature 2 in layerName1
+        values: [
+            { name: "attribute1", value: "value1" },
+            { name: "attribute2", value: "value2" },
+            { name: "attribute3", value: "value3" },
+            ...
+            { name: "attributeN", value: "valueN" }
+        ]
+        zoom: { minx: <feature2_bbox_minx>, miny: <feature2_bbox_miny>, maxx: <feature2_bbox_maxx>, maxy: <feature2_bbox_maxy> }
+    },
+    ...,
+    { //feature N in layerName1
+        values: [
+            { name: "attribute1", value: "value1" },
+            { name: "attribute2", value: "value2" },
+            { name: "attribute3", value: "value3" },
+            ...
+            { name: "attributeN", value: "valueN" }
+        ]
+        zoom: { minx: <featureN_bbox_minx>, miny: <featureN_bbox_miny>, maxx: <featureN_bbox_maxx>, maxy: <featureN_bbox_maxy> }
+    }
+    ], layerName2 : [
+        ...
+    ], 
+    ..., 
+    layerNameN : [
+        ...
+    ]
+}
+</PRE>
+      </DD>
+  </DL>
 
   <DL>
     <DT><STRONG><A name="mapframe_isdigitizing">IsDigitizing()</A></STRONG></DT>



More information about the mapguide-commits mailing list