AnsweredAssumed Answered

add text to map?

Question asked by kmacleod on Aug 4, 2014
Latest reply on Jan 27, 2017 by jay.kapalczynski

I am making a tool that adds text to the map where a user clicks.  First they fill in text in an input box, they can select size and color, then they click somewhere in the map and it adds the text as a graphic.  I already have a nice Draw toolbar working for point/line/poly.

 

Kelly posted the perfect example in this thread.  Allow user to place text on map   Example :  Edit fiddle - JSFiddle

 

Yes, it uses API 1.5.  Good old ESRI forums. But..  I switched out the APIs all the way up to 3.5 and it still works.  However it gets messed up, mostly the HTML and CSS, with version 3.6 and up, of the API. 

 

I was wondering if someone knew why this was? I just want to copy out the text functionality along with its color/size/angle selection, and put it into our site.

 

For some reason I can't find any good examples besides this one.  Which is really perfect but just doesn't seem to work above 3.5 API.  And we are using the version 3.10 of the API in the site.  When I copied the right parts of it into our site it didn't work. No errors or anything, just nothing happened on button click triggering the code.

 

If anyone has a more recent example or way to update this one that would great!  For some reason I am tinkering with textSymbol and not having luck yet.  Perhaps because it is a complex project a lot going on (MVC 5/Bootstrap 3 with a lot of other widgets, jQuery, Angular and other stuff too).  Thanks all for any advice, links or input.  If I figure it out though I'll post back and maybe put it in a Fiddle.

Outcomes