[mapguide-commits] r4660 - in sandbox/rfc71: mapviewernet
mapviewerphp
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Mar 11 10:26:06 EST 2010
Author: jng
Date: 2010-03-11 10:26:06 -0500 (Thu, 11 Mar 2010)
New Revision: 4660
Modified:
sandbox/rfc71/mapviewernet/getselectedfeatures.aspx
sandbox/rfc71/mapviewerphp/getselectedfeatures.php
Log:
#1053: Use shortcut convenience APIs (RFC9)
Modified: sandbox/rfc71/mapviewernet/getselectedfeatures.aspx
===================================================================
--- sandbox/rfc71/mapviewernet/getselectedfeatures.aspx 2010-03-11 15:14:13 UTC (rev 4659)
+++ sandbox/rfc71/mapviewernet/getselectedfeatures.aspx 2010-03-11 15:26:06 UTC (rev 4660)
@@ -251,8 +251,7 @@
site.Open(cred);
MgResourceService resSvc = (MgResourceService)site.CreateService(MgServiceType.ResourceService);
- MgFeatureService featSvc = (MgFeatureService)site.CreateService(MgServiceType.FeatureService);
-
+
MgMap map = new MgMap(site);
map.Open(mapName);
@@ -287,7 +286,7 @@
String filter = selection.GenerateFilter(layer, className);
query.SetFilter(filter);
- MgFeatureReader reader = featSvc.SelectFeatures(fsId, className, query);
+ MgFeatureReader reader = layer.SelectFeatures(query);
MgClassDefinition clsDef = reader.GetClassDefinition();
MgPropertyDefinitionCollection props = clsDef.GetProperties();
Modified: sandbox/rfc71/mapviewerphp/getselectedfeatures.php
===================================================================
--- sandbox/rfc71/mapviewerphp/getselectedfeatures.php 2010-03-11 15:14:13 UTC (rev 4659)
+++ sandbox/rfc71/mapviewerphp/getselectedfeatures.php 2010-03-11 15:26:06 UTC (rev 4660)
@@ -118,12 +118,11 @@
$site = new MgSiteConnection();
$site->Open($cred);
$resourceSrvc = $site->CreateService(MgServiceType::ResourceService);
- $featureSrvc = $site->CreateService(MgServiceType::FeatureService);
//load the map runtime state
//
- $map = new MgMap();
- $map->Open($resourceSrvc, $mapName);
+ $map = new MgMap($site);
+ $map->Open($mapName);
// Create the selection set
$selection = new MgSelection($map);
@@ -162,7 +161,7 @@
$filter = $selection->GenerateFilter($lyr, $class);
$queryOptions->SetFilter($filter);
- $fr = $featureSrvc->SelectFeatures($featResId, $class, $queryOptions);
+ $fr = $lyr->SelectFeatures($queryOptions);
$clsDef = $fr->GetClassDefinition();
$props = $clsDef->GetProperties();
More information about the mapguide-commits
mailing list