[mapguide-internals] generateplot bug in php api?

Paul Spencer pspencer at dmsolutions.ca
Thu Mar 22 19:51:59 EDT 2007


I guess in this specific case I want to set the map extents by  
bounding box or center and scale for some temporary operation and not  
actually save it.  This is useful only because of a bug in the  
generateplot api bindings I guess.  I hadn't noticed a lack of this  
functionality before now ;)

I can't think of any other normal use case offhand where I couldn't  
set the extents using the getvisiblemapextents operation in the  
mapagent.  It might be more convenient in some complex operations to  
set it through the API while processing server-side code, but then  
getting the change back to the client side would be problematic.   
Overall I agree with the lack of this functionality in the API I  
think.  If you could fix the bug, then I would stop complaining!!!

Cheers

Paul

On 22-Mar-07, at 6:34 PM, Trevor Wekel wrote:

> 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
>
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals

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