You can also try looking at the results of MgLayerBase::GetFeatureGeometryName() function
http://mapguide.osgeo.org/files/mapguide/docs/webapi/d5/db1/class_mg_layer_b ase_1397670802efc84d2fc0a93cac61b3d0.htm#1397670802efc84d2fc0a93cac61b3d0 It will return "Image" for the Autodesk raster provider and "Raster" for the GDAL provider. Here's some example code. $map = new MgMap(); $map->Open($resourceService, $this->args['MAPNAME']); $layers = $map->GetLayers(); for ($i = 0; $i < $layers->GetCount(); $i++) { $layer = $layers->GetItem($i); echo($layer->GetFeatureGeometryName()); } Andy Morsell, P.E. Spatial Integrators, Inc. http://www.SpatialGIS.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jackie C. Ng Sent: Tuesday, May 06, 2008 8:03 AM To: [email protected] Subject: Re: [mapguide-users] Determine if Layer is a Raster Layer Look at the xml content of the layer definition. Raster layers have the root element of GridLayerDefinition Vector layers have the root element of VectorLayerDefinition - Jackie Adnan Chughtai wrote: > > Hello All, > > Currently working with the API for MapGuide OpenSource 2.0 and have an > issue with determining with a Layer is a Raster Layer. I am using the > OSGeo FDO Provider for Raster > > In MapGuide 6 - the method getLayerType() returned a string denoting > the layer type, e.g Polyline, Polygon, Raster, etc. > > In MGOS 2.0, the method getLayerType() returns an int with two > possible values 2 -Basemap or 1 - Dynamic. Is there a method in MGOS > 2.0 API that does a similar function as the getLayerType which is in MapGuide 6? > > Regards, > > Adnan > > _______________________________________________ > mapguide-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > ----- http://themapguyde.blogspot.com http://www.linkedin.com/in/jackieng -- View this message in context: http://www.nabble.com/Determine-if-Layer-is-a-Raster-Layer-tp17084050p170848 56.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
