Points for labeling | ArcGIS API for JavaScript

The ArcGIS JavaScript API does not have a labeling engine, but you can create a labeling effect by placing a text symbol at a given point. You can use the geometry service to find a point for placing a label inside a polygon. To try this sample, draw a polygon on the map. When you submit the polygon, it's simplified so it won't throw errors if it overlaps itself. The GeometryService.labelPoints() method determines a point inside the polygon. The parameters are an array of polygon graphics to be labeled and a callback function specifying what to do with the label points. In most cases, you'll be associating each point with a TextSymbol, like this: The ArcGIS JavaScript API does not have a labeling engine, but you can create a labeling effect by placing a text symbol at a given point. You can use the geometry service to find a point for placing a label inside a polygon. To try this sample, draw a polygon on the map. When you submit the polygon, it's simplified so it won't throw errors if it overlaps itself. The method determines a point inside the polygon. The parameters are an array of polygon graphics to be labeled and a callback function specifying what to do with the label points. In most cases, you'll be associating each point with a Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 23, 2016 @ 3:01 am