MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
STRING MgGeoJsonWriter::FeatureToGeoJson ( MgReader reader,
MgTransform transform,
CREFSTRING  idPropertyName,
CREFSTRING  geomPropName 
)

Converts the current feature in the given feature reader to GeoJSON.

.NET Syntax
string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
Java Syntax
String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, String idPropertyName, String geomPropName);
PHP Syntax
string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
Parameters:
featureReader(MgFeatureReader) The feature reader
transform(MgTransform) An optional transform
idPropertyName(String/string) The name of the id property. The value of the property specified will be written to the top-level "id" property of the GeoJSON
geomPropName(String/string) The name of the geometry property. The value of the property specified will be written to the top-level "geometry" property of the GeoJSON. If this property is not specified, no geometry is written.
Returns:
Returns the GeoJSON output as a string.