Patent attributes
Techniques are described for efficient label insertion and collision handling. A bounding geometry for a label to be graphically displayed on a display screen as part of an electronic map is determined, wherein the bounding geometry comprises a circle. The bounding geometry is inserted into a grid index, wherein the grid index represents a viewport of the electronic map. Disjoint regions of the grid index intersected by the bounding geometry are identified, wherein each disjoint region represents a different portion of the viewport. For each intersected disjoint region, it is identified whether there is at least one collision between the bounding geometry and one or more existing bounding geometries in the disjoint region; and responsive to identifying whether there is at least one collision in the intersected disjoint region, a target opacity of the label is set.