POST
|
That shouldn't be happening. Can you provide a repro case that shows using the label layer where it places overlapping labels? Here's how my map looks like. I mean, it makes sense that they overlap, because the label is way too long to fit in small area. Hence, providing the user an ability to rotate the labels, when they want to. [ATTACH=CONFIG]28143[/ATTACH] Thanks!
... View more
10-08-2013
10:55 AM
|
0
|
0
|
711
|
POST
|
I'd like to clarify: the request is to have the label layer use the angle set on text symbols? This currently isn't possible with the label layer (as you found out, text symbol rotation is ignored). This complicates things in terms of finding overlapping labels but I'll see what we can do. Yes. I would like to set the angle on the text symbols. As of overlapping, they currently overlap anyways. That's why I have to rotate them. I could have gone the other way to fix in my situation. However, I just follow the API (https://developers.arcgis.com/en/javascript/jsapi/textsymbol.html), TextSymbol got "angle" property and "setAngle()" method. If you're saying this couldn't be done, and I would suggest to remove it from the API docs, since it may confuse other users.
... View more
10-08-2013
09:34 AM
|
0
|
0
|
711
|
POST
|
Hi, I found in the API documentation that the label rotation is applicable to Line feature only.Parameter: labelOptions [TABLE="class: grid"]OptionAvailable ValuesDefault ValueApplicable Feature TypelabelRotationtrue | false trueLine [/TABLE] { lineLabelPosition: "OnLine", labelRotation: false }Although when I tried to use the .setAngle and rotate using the labelRotation:true it didnt work. The other options seems to be working like lineLabelPosition:"Below" Check this fiddle for reference: http://jsfiddle.net/patelmanya/WAVYL/10/ Since this is in BETA I think this might be a bug and esri might fix this with the final/next release. Hope this helps. If you do find any workaround please post it. Happy weekend!!! Regards, Manish Patel Thanks for the reply, but this doesn't work for me. The only thing I can make the label rotate is to set rotate attribute in <text> itself. It's such a hacky way. I think our best bet is to wait until BETA is over. 🙂
... View more
10-07-2013
10:10 AM
|
0
|
0
|
711
|
POST
|
I'm on JS API 3.7. I tried the new LabelLayer feature. Everything else works fine but I cannot rotate the text. I thought setAngle() in TextSymbol will do that. Turns out nothing get rotated, any idea? Here's how I use it. var parcelsColor = new dojo.Color("#333");
var parcelsTextSymbol = new esri.symbols.TextSymbol().setColor(parcelsColor).setAngle(200);
var parcelsLabelRenderer = new esri.renderers.SimpleRenderer(parcelsTextSymbol);
var parcelsLabel = new esri.layers.LabelLayer({ id: "parcelsLabel" });
parcelsLabel.addFeatureLayer(parcelLayer, parcelsLabelRenderer, "${" + labelField + "}");
map.addLayer(parcelsLabel); Thanks!
... View more
10-03-2013
03:46 PM
|
0
|
8
|
2861
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|