[mapguide-users] Error with MGOS 2.0 and Fusion

Andre Schoonbee andresch at iway.na
Mon Sep 7 02:00:51 EDT 2009


 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



More information about the mapguide-users mailing list