Open($userInfo); $featureService = $siteConnection->CreateService(MgServiceType::FeatureService); $addressMarkerDataResId = new MgResourceIdentifier("Session:" . $mgSessionId . "//AddressMarker.FeatureSource"); $commands = new MgFeatureCommandCollection(); $commands->Add(new MgDeleteFeatures('AddressMarker', "ID like '%'")); $featureService->UpdateFeatures($addressMarkerDataResId, $commands, false); // Create a ReserviceService object and use it to open the Map // object from the sessions repository. Use the Map object to hide // the "ParcelMarker" layer and then save the updated Map back to // the session. $resourceService = $siteConnection->CreateService(MgServiceType::ResourceService); $map = new MgMap(); $map->Open($resourceService, 'Sheboygan'); $layer = GetLayerByName($map, 'AddressMarker'); $layer->SetVisible(false); $layer->ForceRefresh(); $map->Save($resourceService); } catch (MgException $e) { echo $e->GetExceptionMessage(); echo $e->GetDetails(); } ?>