Hi, I am stumped about how to turn on and off a set of mappoints that meet a certain criteria indicated in MXML checkbox choices. In my application, I want to be able to show facilities of a particular size (Large, Medium, Small). When a user clicks "Large" on the checkbox, only facilities identified as Large appear as mapoints; the same would be true for Medium and Small. When the user unclicks "Large" those facilities (and their associated mappoints) are cleared.So far, in the code below, I can get a large red square to appear when the user clicks the "Large" checkbox; however, when the user unclicks "Large" that red square persists. I know the code is running to the "else" condition because I have a trace set up that appears when I debug. I suspect it has something to do with "wmp2_Q1" which is a WebMercatorMapPoint, but I can't figure out how to remove it.Thanks for any help/guidance!protected function checkbox1_clickHandler(event:MouseEvent):void
{
if (Q1_cb.selected) {
var employees_from_facility_Q1: Array = from_query.filter(set_population);
for (var i:uint = 0; i < employees_from_facility_Q1.length; ++i){
var myGraphicMarker_Q1: Graphic = new Graphic(new WebMercatorMapPoint(employees_from_facility_Q1.facility_lon, employees_from_facility_Q1.facility_lat), new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 30, 0xFF3333, 0.5));
var wmp2_Q1: WebMercatorMapPoint = new WebMercatorMapPoint(employees_from_facility_Q1.facility_lon, employees_from_facility_Q1.facility_lat);
myGraphicsLayer.add(myGraphicMarker_Q1);
myMap.centerAt(wmp2_Q1);
myGraphicsLayer.refresh(); }}
else {
myGraphicsLayer.remove(myGraphicMarker_Q1);
trace ("selected false");
myGraphicsLayer.refresh();}}
private function set_population(element:*, index:int, arr:Array): Boolean{
return (element.employees_per_facility > markerQ2);}