Any help appreciated....
Here is what I'm trying to accomplish.
The user has the ability to add map text graphics vi mappoint.
After the map has multiple pieces of map text, allow the user to interactively select the text and make graphic adjustments.... ie color, size, location, etc....
I've reviewed alot of the code to select the text using graphics contained within the map extent, and then can move the text to a new location.
My problem is, when the user selects the text it needs to change color to indicate the text has been selected. This part works.
After moving the text, it should return to it's original color.... ie original textsymbol.
I've been trying to accomplish this by the following: once the user selects the text, I save the textsymbol to a temp textsymbol. I then change the selected text to a defined text symbol. Once the text has been repositioned on the map, I then set the text back to it's original state via the temp textsymbol.
This appears to work initially. However, after mulitiple selections of text and moving them around the process doesn't work properly. Various other text on the map changes to the selection color.
I tried the following method as shown in the forum:
for (var i:Number = 0; i < myGraphicsLayer.graphicProvider.length; i++)
{
graphic = myGraphicsLayer.graphicProvider as Graphic;
if (extent.contains(MapPoint(graphic.geometry)))
{
Sym = graphic.symbol as TextSymbol; //gets info from selected text
selText.text = Sym.text;
//graphicName = graphic.name.toString();
//Alert.show(graphicName); //gets graphic name
graphic.symbol = selText;
results.push(graphic);
}
//else if point was previously highlighted, reset its symbology
else if (graphic.symbol == selText)
{
graphic.symbol = aText;
}
}
AdjustGraphics.activate(1, results);
This actually works, except all text which is not selected reverts back to a set textsymbol. If the map has alot of text with various textsymbols, they all get reset.
My thoughts were to try and select the mappoint(ie text).... name it or id it.... change it to the selection color...... make location adjustments...... then restore the text to its color, by selecting the graphic based on the temp name/id I assigned it. Is this possible? Does anyone have a more effective way to accomplish what I'm attempting?
thanx again,
Eddie Quinlan
G.I.S. Coordinator
Okaloosa County Property Appraiser