Infrastructure Map Server General Discussion

Infrastructure Map Server General Discussion

Reply
New Member
clowesj
Posts: 2
Registered: ‎03-24-2011
Message 1 of 4 (922 Views)
Accepted Solution

Fusion Error when trying to select by Attribute - MapGuide Enterprise 2010

922 Views, 3 Replies
03-24-2011 01:59 AM

I'm trying to select features by attribute using the following code:

 

Var options = {};
Options.layers = ‘roads_layer’;
Options.filter = REFVAL = 'B4323'’;
Parent.Fusion.getWidgetById(‘Map’).query(options);

 

This produces  the Fusion Error : FATAL: xml2json: invalid XML document: MgInvalidArgumentException : ...

 

I find that if I add the geometry parameter to "Options" with a dummy geometry then the error goes away. But I don't want to select by geometry, just by the attribute.

 

The dataset I am connected to is a Shapefile.

Any ideas?

Hi.

 

our implementation is really application specific and relies other components. it would be more confusing to look at it than the fusion one.

 

you should be able to find it in Fusion.Layers.MapServer class (maybe in .../fusion/layers/MapServer/MapServer.js)

 

search for the query method "query:". we pretty much used that exact code.

 

 

Active Member
janechii
Posts: 10
Registered: ‎03-23-2011
Message 2 of 4 (912 Views)

Re: Fusion Error when trying to select by Attribute - MapGuide Enterprise 2010

03-25-2011 01:14 PM in reply to: clowesj

I have MGE2011 and had similar issues. From what i gather through reading from forums, the "query" in Fusion for mapguide has changed substantially and doesn't seem to want to use the "filter" option anymore, even though you'll see that in all the documentations. Instead of sending a request through Query.php, it is now going directly to mgagent.fcgi.

 

anyways, in the fusin library, there are 2 implementations of the query method, one for mapguide and one for mapserver. I looked at the code for mapserver's implementation (which still uses the Query.php) and reimplemented to work with mapguide and now my query method works like in the documentations.

 

Good luck!

New Member
clowesj
Posts: 2
Registered: ‎03-24-2011
Message 3 of 4 (901 Views)

Re: Fusion Error when trying to select by Attribute - MapGuide Enterprise 2010

03-28-2011 08:33 AM in reply to: clowesj

Thanks. I'm glad its not just me.

 

Any chance you could share your code for querying MapGuide?

Active Member
janechii
Posts: 10
Registered: ‎03-23-2011
Message 4 of 4 (898 Views)

Re: Fusion Error when trying to select by Attribute - MapGuide Enterprise 2010

03-28-2011 02:18 PM in reply to: clowesj

Hi.

 

our implementation is really application specific and relies other components. it would be more confusing to look at it than the fusion one.

 

you should be able to find it in Fusion.Layers.MapServer class (maybe in .../fusion/layers/MapServer/MapServer.js)

 

search for the query method "query:". we pretty much used that exact code.

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!