Select to view content in your preferred language

return points from  labelPointsCompleteHandler

991
2
08-10-2010 04:53 AM
WilliamBailey
Emerging Contributor
I need to return points from  geometryService.labelPoints via the labelPointsCompleteHandler function. I have some irregular shaped polygons and I need the labels/infowindow flags to be inside the polygon. Anyone have an idea on how to use this function to return the actual mapPoint to a calling function. The sample only uses "user" drawn graphics, I will be passing parcel polygon graphics one at a time.
I have used model builder in past to accomplish this by using "inside" option of poly-to-point tool, but it requires double querying (polygon and point layers). I was hoping to accomplish this in a more efficient manner.

p.s. I am still using Flex 1.3
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
William,

     In 1.3 API you will have to do a query first so that you can have the graphic of the polygon returned to you and then you can feed that graphic to the geometryService

GeometryService.labelPoints([graphic]);
0 Kudos
WilliamBailey
Emerging Contributor
I have that part covered, I really think my problem is timing issue because I call simplify during an async onResult function for graphical query... the arrayCollection I'm trying to access after this call doesn't exist yet.

Problem solved: Instead of trying to get mappoint right away, I call another function to return it, this seems to give enough time for label_complete to happen.

thanks for your help
0 Kudos