[mapguide-users] Error with MGOS 2.0 and Fusion

Mike Adair madair at dmsolutions.ca
Mon Sep 7 12:19:15 EDT 2009


And some of us go on vacation once in a while...

In any case, it sounds like you should be listening for 
Fusion.Event.MAP_LOADED event which gets fired when the Map object is 
loaded and ready.  FUSION_INITIALIZED is fired when the AppDEf has been 
parsed and widget objects created.

Mike

Andre Schoonbee wrote:
>  Hi Guys
>
> I have submited this question, but to dat, have not received any feedback. I
> am certain, there's a lot of persons, capable of helping and guiding me. A
> Bit disapointing to see no responce coming. I guess it is fir this reason
> why the general public tends to stay away from Open Source?
>
> Andre
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andre Schoonbee
> Sent: 04 September 2009 10:48 AM
> To: 'MapGuide Users Mail List'
> Subject: [mapguide-users] Error with MGOS 2.0 and Fusion
> Importance: High
>
> I'm trying to create a custom query for a layer filtering when the map
> loads. Basically the code I'm executing in the var fusionInitialized
> function is: 
>
> var map = Fusion.getWidgetById('Map'); 
> var options = {}; 
> options.maxFeatures = 0; 
> options.layers = '(Points)'; 
> options.filter = '(PointNr LIKE \'%007%\')'; 
> map.query(options); 
>
> However, the query execution throws an exception: 
>
> Fusion Error: 
> WARNING: Exception occurred in AJAX callback. 
> Message: invalid label 
> Location: http://localhost:8008/mapguide/fusion/MapGuide/MapGuide.js (774) 
> Response: ERROR: Argument is null. 
> Argument is null. 
> Exception occurred in method MgResourceIdentifier.CheckName at line 624 in
> file
> d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\platformbase\Ser
> vices/ResourceIdentifier.cpp 
>
> - MgMap.Open line 457 file
> d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\mapguidecommon\M
> apLayer/Map.cpp 
> - MgResourceIdentifier.CheckName line 624 file
> d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\platformbase\Ser
> vices/ResourceIdentifier.cpp 
>
>
> I have debugged the query process from MapGuide.js  - query :
> function(options) - adding the alert massage as shown below: 
> //.... 
> var ajaxOptions = { 
>             onSuccess: OpenLayers.Function.bind(this.processQueryResults,
> this, zoomTo), 
>             parameters: params}; 
> /* >>>>>> */ alert('mapname:
> '+params.mapname+'\nsessionid:'+params.sessionid+'\nlayers:
> '+params.layers+'\nfilter: '+params.filter); 
>         Fusion.ajaxRequest(loadmapScript, ajaxOptions); 
> //...... 
>
> The message shows that at the execution of the query both the mapname and
> sessionid are not defined for the map 
>
> mapname: undefined 
> sessionid:undefined 
> layers: (Points) 
> filter: (PointNr LIKE '%007%') 
>
> Q: Since the fusionInitialized is registered to be executed on
> Fusion.Event.FUSION_INITIALIZED, what is the problem with the above test ? 
> My idea was that the map should have been fully loaded by then and the
> filter queried ok. 
>
> Thank you,
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>   

-- 
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   madair at dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca




More information about the mapguide-users mailing list