Draw toolbar for iOS | ArcGIS API for JavaScript

This sample shows how to use the draw and edit toolbars when building an application designed to run on an iOS device. The sample uses the compact build to reduce the size of the download required on the mobile device. The draw toolbar allows you to sketch geometries on a map, including polylines, polygons, points and starting at version 2.1 shapes like Arrows and Circles. After drawing geometries on the map, click the shape to place the graphic in edit mode. While in edit mode you can move the graphics and modify the vertices. Note: When building an application for a mobile device you can use any of the draw toolbar's sketch modes except the line, freehand polyline and freehand polygon. When using the draw toolbar on mobile devices, you'll want to add the viewport meta tag to the application. The viewport meta tag is used to configure the scale of the viewport. The snippet below sets the initial scale to 1.0, if you do this without specifying a width Safari will use the device-width in portrait and the device-height when in landscape orientation. The user-scalable option is very important when working with the draw toolbar, this option prevents users from zooming in and out. This is necessary because when drawing shapes like a polygon with the draw toolbar, double-click is used to finish the shape and if you don't set user-scalable to no double-click will perform a zoom-in. In some cases, you may want to change the layout of your application depending on the orientation of the device. When the iPhone orientation changes the onorientationchange event is fired. Add a handler for this event by adding the following to the HTML body element. For more details on building web applications for the iPhone operating system view the Safari Reference Library. Source.

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