[mapguide-users] MgDataPropertyDefinition::SetScale()

Howitzer khinskens at wesa.ca
Mon Jul 8 13:04:53 PDT 2013


Hello List,

How exactly do I get the list of the available properties for
MgDataPropertyDefinition?
Or to be more direct... what do I put as the string name in order to use the
SetScale() method in my below code? Using "SCALE" did not set the scale to
4000.

Looking at the  MgDataPropertyDefinition Constructor Definition
<https://mapguide.osgeo.org/files/mapguide/docs/webapi/d6/d5b/class_mg_data_property_definition_e4661ff3214fff3f4fce1c37d9827972.htm#e4661ff3214fff3f4fce1c37d9827972>  
it says I can use:

*typedef const wstring& CREFSTRING* API string.

as "the name of the property". Which is not very helpful...


/
MgInitializeWebTier($configFilePath);
$userInfo = new MgUserInformation($session);
$siteConnection = new MgSiteConnection();
$siteConnection->Open($userInfo);
$featureService = $siteConnection->CreateService(2);
$resourceService = $siteConnection->CreateService(0);

$map = new MgMap($siteConnection);
$map->Open($mapName);
	
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter($keyName . " in (" . $key . ")");
	
$layer = $map->GetLayers()->GetItem($layerName);
$parcelDataResId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$featureClassName = $layer->GetFeatureClassName();
$featureReader = $featureService->SelectFeatures($parcelDataResId,
$featureClassName, $queryOptions);
/
*$dataPropDefinition = new MgDataPropertyDefinition("SCALE");
$dataPropDefinition->SetScale(4000);*
/
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $featureReader, 0);
$selectionXml = $selection->ToXml();
$selection->Save($resourceService, $map->GetName());

echo $selectionXml;
/



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MgDataPropertyDefinition-SetScale-tp5064817.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list