[mapguide-internals] generateplot bug in php api?

Trevor Wekel trevor.wekel at autodesk.com
Thu Mar 22 18:34:36 EDT 2007


Hi Paul,

Setting the viewed extents from a web extensions script is a little
tricky.  Currently, the AJAX and DWF viewers drive changes in center and
scale.  Setting extents programmatically does change the center and
scale for the map.  This makes the viewer interaction model more
complicated since there are now two driving mechanisms involved for two
different viewers.  What happens if a web extensions script executes a
zoom while the user is panning?  Which interaction should win?  


-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Paul
Spencer (External)
Sent: Thursday, March 22, 2007 2:01 PM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] generateplot bug in php api?

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/ |
+-----------------------------------------------------------------+




_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list