I'm building an interactive map. A feature that has been identified as important by the stakeholders is being able to add points and associate data with them. I'd like this to be very user-friendly in terms of editing or deleting points or the associated text. Basically, what I want is a way to directly associate a point and some arbitrary text.
Currently, I'm using a graphicsLayer for the points. I can use the graphicsLayer with TextSymbol to add text, but each individual graphic object can only one symbol (this means no point if I go with text, and vice-versa). Basically, my "solution" is to do the following:
var newPoint = new Graphic(event.geometry); pointGraphics.add(newPoint); newPoint = new Graphic(event.geometry, myTextSymbol); pointGraphics.add(newPoint);
This isn't the end of the world, but it's not preferable. The point and it's associated string are separate entities so modifying one needs to be propagated to the other. Is there a build in feature to handle this? LabelLayer was my first guess, but it appears to only support FeatureLayers.