If you want optimal performance for your application, take these guidelines into account when you activate labeling:
-
Don’t create new label and text style JavaScript object literals in the
paintLabel
method of your feature painter. Instead, create the required style objects once, and store them as instance variables. -
Drawing many rotated labels on a path can slow down the application. To increase performance, turn off label rotation.
-
When LuciadRIA positions a label on the map, it considers each allowed position as a possible candidate for placing the label.
This means that it checks each allowed position until it finds a valid, non-overlapping position. If it needs to check many labels, with significant decluttering, your application may slow down.
You can prevent that by limiting the number of allowed positions.