Add graphics to a map | ArcGIS API for JavaScript

The toolbar is not a user interface component that you automatically see on the page. Instead, it's a helper class that you can use to let people sketch geometries on the map. It saves you the effort of writing the code for sketching each geometry type. You just activate the type of geometry you want people to sketch. In this example, each HTML button activates a different geometry type. Here's the code for the Point button: When you click this button, the toolbar activates the point geometry. Alternatively you could allow people to choose the geometry type from a dropdown list, a set of radio buttons, or some other control. In this example, the toolbar's 'onDrawEnd' event ensures that you see something on the map when you finish sketching a feature: function sets the appropriate symbol for the geometry type. In this example, the symbol is taken from a dropdown list. Each item of the list is a symbol defined on one line, like this: 'M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z' Source.

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