[mapguide-commits] r8960 - in branches/2.6/MgDev: . Common/MapGuideCommon/Controller Doc/devguide/source Server/src/Services/Mapping Web/src/schemareport

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu May 12 08:17:20 PDT 2016


Author: jng
Date: 2016-05-12 08:17:20 -0700 (Thu, 12 May 2016)
New Revision: 8960

Modified:
   branches/2.6/MgDev/
   branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
   branches/2.6/MgDev/Doc/devguide/source/revision_history.rst
   branches/2.6/MgDev/Doc/devguide/source/supplemental_development.rst
   branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
   branches/2.6/MgDev/Web/src/schemareport/displayschemafunctions.php
Log:
Merged revision(s) 8958-8959 from branches/3.0/MgDev:
Merged revision(s) 8956 from trunk/MgDev:
devguide: Fix malformed revision history table and add a section about mapguide-rest in supplemental_development.rst
........

........
Merged revision(s) 8871, 8912, 8921, 8942 from sandbox/adsk/3.1n:
Fix #2585: the total entries is not correct with Oracle data source.

It is because the initial vale of total entries is -1. We should set it to 0.
........
Fix the issue that DateTime value cannot be displayed in selection panel.
........
In some special FDO provider such as Autodesk RealDWG provider, the 'Geometry' property is already in property mappings. In method MgHtmlController::WriteSelectedFeatureAttributes(), we will first add all mapping properties, then add geometry property. We need to check if 'Geometry' is added to avoid adding it twice.
........
Fix the defect that zoom raster image results in server crash.
It is because if the displayed size of image is very small, the width or height may be 0. And we will use the width and height as the parameters of RESAMPLE. FDO Raster provider will crash in this case. I set width or height to 1 if its value is 0 to avoid the error.
........

........



Property changes on: branches/2.6/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/3.0/MgDev:8658
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/rfc155:8874-8884
/sandbox/rfc94:5099-5163
/trunk/MgDev:8209-8210,8230,8313,8333,8359,8388,8392,8423,8433,8439,8443-8444,8518-8519,8567-8568,8571,8588-8589,8595,8616-8618,8626,8682,8728,8844
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/3.0/MgDev:8658,8958-8959
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625
/sandbox/adsk/3.1n:8871,8912,8921-8922,8942
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/rfc155:8874-8884
/sandbox/rfc94:5099-5163
/trunk/MgDev:8209-8210,8230,8313,8333,8359,8388,8392,8423,8433,8439,8443-8444,8518-8519,8567-8568,8571,8588-8589,8595,8616-8618,8626,8682,8728,8844,8956

Modified: branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2016-05-12 15:08:23 UTC (rev 8959)
+++ branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2016-05-12 15:17:20 UTC (rev 8960)
@@ -524,7 +524,8 @@
                     }
                 }
             }
-            propNames->Add(selLayer->GetFeatureGeometryName()); //Don't forget geometry
+            if (!propNames->Contains(selLayer->GetFeatureGeometryName()))
+                propNames->Add(selLayer->GetFeatureGeometryName()); //Don't forget geometry
             xmlOut.append(L"</LayerMetadata>\n");
             Ptr<MgReader> reader = selectionSet->GetSelectedFeatures(selLayer, selLayer->GetFeatureClassName(), propNames);
             while(reader->ReadNext())
@@ -603,7 +604,7 @@
                                 //ToXmlString() won't work with dates before Jan 1, 1970, so use yyyy-mm-dd hh:mm:ss
                                 STRING dateStr;
                                 STRING str;
-                                if (dt->IsDate())
+                                if (dt->GetYear() != -1)
                                 {
                                     MgUtil::Int32ToString(dt->GetYear(), str);
                                     dateStr += str;
@@ -616,9 +617,9 @@
                                     MgUtil::PadLeft(str, 2, L'0');
                                     dateStr += str;
                                 }
-                                if (dt->IsTime())
+                                if (dt->GetHour() != -1)
                                 {
-                                    if (dt->IsDate())
+                                    if (dt->GetYear() != -1)
                                     {
                                         dateStr += L" ";
                                     }

Modified: branches/2.6/MgDev/Doc/devguide/source/revision_history.rst
===================================================================
--- branches/2.6/MgDev/Doc/devguide/source/revision_history.rst	2016-05-12 15:08:23 UTC (rev 8959)
+++ branches/2.6/MgDev/Doc/devguide/source/revision_history.rst	2016-05-12 15:17:20 UTC (rev 8960)
@@ -10,9 +10,12 @@
 +---------+-----------------+-----------------+--------------------------------------------------------------+
 | Version | Authors         | Date            | Summary of Changes                                           |
 +=========+=================+=================+==============================================================+
+| 2.0.2   | Jackie Ng       | May 2016        | Fix malformed revision history table and add section about   |
+|         |                 |                 | mapguide-rest in supplemental development options            |
++---------+-----------------+-----------------+--------------------------------------------------------------+
 | 2.0.1   | Jackie Ng       | Jul 2014        | Updated code sample in section "Working with Feature Data"   |
 |         |                 |                 | to reflect the updated Sheboygan sample data set             |
-+=========+=================+=================+==============================================================+
++---------+-----------------+-----------------+--------------------------------------------------------------+
 | 2.0     | Jackie Ng       |                 | First version of developer's guide in source form            |
 |         |                 |                 |                                                              |
 |         |                 |                 | Added .net and Java code samples to match PHP examples       |

Modified: branches/2.6/MgDev/Doc/devguide/source/supplemental_development.rst
===================================================================
--- branches/2.6/MgDev/Doc/devguide/source/supplemental_development.rst	2016-05-12 15:08:23 UTC (rev 8959)
+++ branches/2.6/MgDev/Doc/devguide/source/supplemental_development.rst	2016-05-12 15:17:20 UTC (rev 8960)
@@ -35,4 +35,21 @@
 
 This library is used by the MapGuide Maestro application, and can be used in your own applications.
 
-Visit `the Maestro project homepage <http://trac.osgeo.org/mapguide/wiki/maestro>`_ for more information
\ No newline at end of file
+Visit `the Maestro project homepage <http://trac.osgeo.org/mapguide/wiki/maestro>`_ for more information
+
+.. _mapguiderest:
+
+mapguide-rest
+-------------
+
+mapguide-rest provides a REST API for MapGuide and includes a framework for easy publishing of spatial data.
+
+The REST API allows for any library capable of making HTTP request to work with MapGuide.
+
+mapguide-rest can be deployed on both Windows and Linux instances of MapGuide.
+
+Visit `the mapguide-rest homepage <https://github.com/jumpinjackie/mapguide-rest>`_ for more information
+
+.. note::
+
+    mapguide-rest requires a version of MapGuide that bundles PHP 5.3 or newer.
\ No newline at end of file

Modified: branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
===================================================================
--- branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp	2016-05-12 15:08:23 UTC (rev 8959)
+++ branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp	2016-05-12 15:17:20 UTC (rev 8960)
@@ -730,6 +730,10 @@
                     double pixelsPerMapUnit = dr->GetMetersPerUnit() / METERS_PER_INCH * dr->GetDpi() / dr->GetMapScale();
                     int width = (int)(extent.width() * pixelsPerMapUnit + 0.5);
                     int height = (int)(extent.height() * pixelsPerMapUnit + 0.5);
+                    // if width or height is 0, raster provider will throw an exception. 
+                    // we set it to 1 to avoid the exception.
+                    if (0 == width) width = 1;
+                    if (0 == height) height = 1;
 
                     //perform the raster query
                     FdoPtr<FdoIFeatureReader> fdoReader;


Property changes on: branches/2.6/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/jng/createruntimemap/Server/src/Services/Mapping/MappingUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6250-6326
   + /branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/3.0/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:8958-8959
/sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/adsk/3.1n/Server/src/Services/Mapping/MappingUtil.cpp:8942
/sandbox/jng/createruntimemap/Server/src/Services/Mapping/MappingUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163

Modified: branches/2.6/MgDev/Web/src/schemareport/displayschemafunctions.php
===================================================================
--- branches/2.6/MgDev/Web/src/schemareport/displayschemafunctions.php	2016-05-12 15:08:23 UTC (rev 8959)
+++ branches/2.6/MgDev/Web/src/schemareport/displayschemafunctions.php	2016-05-12 15:17:20 UTC (rev 8960)
@@ -120,7 +120,7 @@
     //
     //NOTE: If MapGuide supported scrollable readers like FDO, we'd have also tried 
     //that as well.
-    $totalEntries = -1;
+    $totalEntries = 0;
     $featureName = $schemaName . ":" . $className;
     $canCount = false;
     $gotCount = false;



More information about the mapguide-commits mailing list