[mapguide-internals] generateplot bug in php api?

Paul Spencer pspencer at dmsolutions.ca
Thu Mar 22 16:01:16 EDT 2007


Hi all,

In the API documentation, there are three potential signatures for  
the generateplot function.  It seems that the second signature will  
not work in PHP due to an error in the swig bindings:

virtual MgByteReader * 	GeneratePlot (MgMap *map, MgCoordinate  
*center, double scale, MgPlotSpecification *plotSpec, MgLayout  
*layout, MgDwfVersion *dwfVersion)

Calling this function results in a PHP Fatal error:  Arguments passed  
did not match any overload for method  
_wrap_MgMappingService_GeneratePlot

The other signatures seem to work.  So in an effort to work around  
this, we decided it would be easier to temporarily zoom the map to a  
center point and scale and use GeneratePlot (MgMap *map,  
MgPlotSpecification *plotSpec, MgLayout *layout, MgDwfVersion  
*dwfVersion) that to calculate the extents from the center point and  
scale.

Perhaps it is just me, but there is actually no way to change the  
extents of a MgMap object in the PHP API!  It seems very odd that you  
cannot call SetExtents() or SetView() or something on the MgMap  
object!  What have I overlooked?

Cheers

Paul
+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






More information about the mapguide-internals mailing list