1. An electronic device comprising: a set of processing units; and a non-transitory machine-readable medium storing a program for sampling map labels in a region of a map, the program comprising sets of instructions for: determining a first subregion of the map region to be rendered; determining a set of subregions in a neighborhood of the first subregion; for each subregion in the set of subregions, applying a weight value to the subregion based on the subregion's distance from the first subregion, wherein more weight is applied to a subregion that is closer to the first subregion than a subregion that is farther from the first subregion; analyzing map labels associated with the set of subregions in the neighborhood of the first subregion to determine a regional density of map labels, the regional density being based on a total weighted area of the set of subregions and a weighted total number of map labels of the set of subregions, where analyzing map labels includes: calculating the weighted total area of the set of subregions by summing an area for each subregion in the set multiplied by the weight value applied to the subregion, calculating the weighted total number of map labels of the set of subregions by summing a number of map labels of each subregion in the set multiplied by the weight value applied to the subregion, and multiplying a desired density by the weighted total area of the neighborhood set of subregions and dividing by the weighted total number of map labels in the neighborhood of the set of subregions; and sampling map labels associated with the first subregion based on the determined regional density of map labels, wherein a sampling rate for the map labels associated with the first subregion (i) is increased when the determined regional density of map labels decreases and (ii) is decreased when the determined regional density of map labels increases.