Select to view content in your preferred language

label issue and graphic overlap

822
1
05-25-2011 12:20 PM
abukhan
New Contributor III
HI:

I am having two issues:


issue 1:

I showed tract polygons on the map using featurelayer..I showed the tract number for labels..
I used tract geometry.extent.center.x, and geometry.extent.center.y as the mappoint and used these mappoints for labels(with symbol set to textsymbol)

Problem happens when we encounter such a geometry where center falls outside the polygon geometry..

In that case , the tract number shows in outside the polygon and difficult to know which one it belogs to..

Is there a way to fix it ??( I mean to get a mappoint that always falls inside the polygon..Note there is an algorithm to determine whether a point is inside a polygon by finding out if i crosss the boundary in odd number, but I can not implement that because I donot have points that comprise that polygon and also it will be killer for performance)







issue 2:

Two graphics layer --both layers got icons... Some of the icons in one layer falls on top of the icons of the other layer...Is there a way to separate them out?



Thanks

Abu Khan
Tags (2)
0 Kudos
1 Reply
MehulChoksey
Esri Contributor
For issue 1: you might want to use labelPoints method of GeometryService.
http://help.arcgis.com/en/webapi/flex/apiref/index.html?com/esri/ags/tasks/GeometryService.html&com/...

But this would mean one more call to the server.
0 Kudos