Hello, I am looking at creating a text piece that will go with the drawing tools. Drawing applications have a text tool that allows you to click on the screen and have a text box appear and you can add text. A good example is Paint in windows, I am trying to do something similar to use with the drawing tools. Do you have any examples of this? I am not sure where to start.
Thank you,
Draw text
Hi Scott,
Sorry I haven’t found related sample for this requirement.
As below is some points I think about how to implement that:
1. For easier, you should want to build a custom control for the text box, just draw input text back to map.
2. If you want to put a polygon in map and resize it, you need to raise event after resize polygon in EditInteractiveOverlay or TrackInteractiveOverlay.
3. You need implement your text style and show text on map.
4. You can put a invisible point and shows label for it instead of directly draw text on map.
5. You need calculate text size and set wrapping if necessary. Here we have a sample contains some information about that. wiki.thinkgeo.com/wiki/Source_Code_ServicesEditionSample_ScalingTextStyleForPolygon_101001.zip
Wish they are helpful and you can let us know your thinking for discuss.
Regards,
Don