[mapguide-internals] MapGuide Server API implementation Suggestions

Carl Jokl carl.jokl at keynetix.com
Fri Jul 18 03:37:02 EDT 2008


In my recent work with the MapGuide server API I have found that there are a
couple of items in the implementation I wanted to ask about.

First the MgResourceService has a method "ResourceExists" or something
similar but if called it throws a not implemented exception. Are there plans
to implement this method any time soon? If it were implemented then it would
allow for checking in advance for resources which might not be present and
responding if they are not insted of trying to load a resource and
recovering from the exception thrown if it is not there. Good programming
practice dictates exceptions should not be used as part of normal program
flow. 

The second item I wanted to mention was the MgFeatureReader as held inside
an MgFeatureProperty which is retured after an insert operation has been
completed. This feature reader does not contain a MgClassDefinition object.
This has posed a problem in my code because it has the capability to create
ID object classes (our own classes) using the feature reader by descovering
the id properties of the feature class and the property types and loading
them automatically. Not only is it not possible to check what the id
properties are without the class definition, in addition it looks like
internally the MgFeatureReader relies on the internal Class definition for
determining the data type of properties. This means that trying to get the
data type int identifier for any property from the feature reader causes an
MgNullReferenceException. Is there a reason why this particular feature
reader either does not or cannot hold a class definition for the class which
was inserted. The real use in the returned reader as far as the application
I am working on is concerned is that for feature classes which have an auto
generated id the id of the newly created feature can be retrieved after an
insert. This makes it easy for example to create a new feature and then zoom
to it on the map. 
-- 
View this message in context: http://www.nabble.com/MapGuide-Server-API-implementation-Suggestions-tp18524058p18524058.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.



More information about the mapguide-internals mailing list