User Tools

Site Tools


map_suite_webapi_drawing_and_editing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
map_suite_webapi_drawing_and_editing [2015/09/18 07:37]
admin
map_suite_webapi_drawing_and_editing [2015/12/03 09:37] (current)
tgwikiupdate
Line 3: Line 3:
 {{youtube>​ekyHMB_cXFM?​large |Web API Drawing & Editing Learning Sample Video}} {{youtube>​ekyHMB_cXFM?​large |Web API Drawing & Editing Learning Sample Video}}
  
 +<div newline></​div>​
 +<div download_viewsource_buttons tryitonline>​
 +{{filehistory:​WebAPIEditionSample_DrawingAndEditing_20150417.zip|C#​ Project}}
 +[[source_code_webapieditionsample_draweditfeatures.zip|View Source]]
 +[[http://​webapisamples.thinkgeo.com/​DrawEditFeatures/​leaflet/​|Try It Online(Leaflet)]]
 +[[http://​webapisamples.thinkgeo.com/​DrawEditFeatures/​openlayers/​|Try It Online(Openlayers)]]
  
 +</​div>​
 ===Overview=== ===Overview===
  
Line 12: Line 19:
  
  
-===Drawing Tools=== +==== Drawing Tools ==== 
- +<div captionwithborder floatright>​ 
-{{webapiedition:​DrawEditFeatures_Desktop.png|A new, unsaved feature (in pink) and existing features (gray). Note the toolbar on the left.}} +{{webapiedition:​DrawEditFeatures_Desktop.png?300}} 
 +\\ 
 +//A new, unsaved feature (in pink) and existing ​ 
 +\\ 
 +features (gray). Note the toolbar on the left.// 
 +</​div>​
  
 Below the zoom in/out buttons on the toolbar on the left, you'll see another set of tools for drawing and editing features. You can use these tools to draw lines, polygons, rectangles, circles, or points. To do this, simply click the tool button, then click the location on the map where you'd like to begin drawing. To continue drawing the feature, click the location of the next vertex (without dragging), and so on, then double-click the location of the last vertex. To add a point, activate the "Add point" tool and click once in the desired location. ​ Below the zoom in/out buttons on the toolbar on the left, you'll see another set of tools for drawing and editing features. You can use these tools to draw lines, polygons, rectangles, circles, or points. To do this, simply click the tool button, then click the location on the map where you'd like to begin drawing. To continue drawing the feature, click the location of the next vertex (without dragging), and so on, then double-click the location of the last vertex. To add a point, activate the "Add point" tool and click once in the desired location. ​
Line 23: Line 34:
 When finished making additions and edits, be sure to save your changes to the server using the "Save to server"​ button. When finished making additions and edits, be sure to save your changes to the server using the "Save to server"​ button.
  
-===Edit Tool=== +<div newline></​div>​ 
- +==== Edit Tool ==== 
-{{webapiedition:​edit_features.png|Edit mode.}}+<div captionwithborder floatright>​ 
 +{{webapiedition:​edit_features.png?300}} 
 +\\ 
 +Edit Mode 
 +</​div>​
  
 After selecting the Edit tool button, the features will turn pink, and tiny white boxes will appear around their edges. These characteristics indicate that you are in edit mode. The white boxes are the vertices on which the shape is based. You can move these vertices to adjust a feature'​s shape. Be sure to click the "​save"​ option that pops up next to the Edit button once you enter edit mode to save your change, or select "​cancel"​ to cancel your changes. After selecting the Edit tool button, the features will turn pink, and tiny white boxes will appear around their edges. These characteristics indicate that you are in edit mode. The white boxes are the vertices on which the shape is based. You can move these vertices to adjust a feature'​s shape. Be sure to click the "​save"​ option that pops up next to the Edit button once you enter edit mode to save your change, or select "​cancel"​ to cancel your changes.
Line 31: Line 46:
 Be sure to also save your edits to the server using the "Save to server"​ button when finished. The features will be rendered in gray once again, and the vertices will disappear, indicating that your edits have been saved, and you are no longer in edit mode. Be sure to also save your edits to the server using the "Save to server"​ button when finished. The features will be rendered in gray once again, and the vertices will disappear, indicating that your edits have been saved, and you are no longer in edit mode.
  
-===Delete Tool===+====Delete Tool====
  
 Use the trash can icon (second from the bottom) to toggle into delete mode and remove a shape entirely. Simply activate the tool, the click on the feature you wish to remove. Be sure to click the "​save"​ option that pops up next to the trash can once you enter delete mode to save your change, or select "​cancel"​ to cancel deletion. Use the trash can icon (second from the bottom) to toggle into delete mode and remove a shape entirely. Simply activate the tool, the click on the feature you wish to remove. Be sure to click the "​save"​ option that pops up next to the trash can once you enter delete mode to save your change, or select "​cancel"​ to cancel deletion.
Line 37: Line 52:
 Be sure to also save your edits to the server using the "Save to server"​ button when finished. The features will be rendered in gray once again, and the vertices will disappear, indicating that your changes have been saved. Be sure to also save your edits to the server using the "Save to server"​ button when finished. The features will be rendered in gray once again, and the vertices will disappear, indicating that your changes have been saved.
  
-===Saving Edits===+====Saving Edits====
  
 Use the "Save to server"​ icon at the bottom of the toolbar to save your additions and edits to memory on the server. Features and attribute data can be stored in a variety of formats, including Shapefiles, geodatabases,​ or SQL Server databases, for consumption by other users. ​ Use the "Save to server"​ icon at the bottom of the toolbar to save your additions and edits to memory on the server. Features and attribute data can be stored in a variety of formats, including Shapefiles, geodatabases,​ or SQL Server databases, for consumption by other users. ​
Line 43: Line 58:
 Once saved, they will be rendered back in gray, based on the same GetTile method used to render the underlying basemap. Once saved, they will be rendered back in gray, based on the same GetTile method used to render the underlying basemap.
  
-===Sample Code=== +====Sample Code====
  
 +Now that you've read about these tools, see how to wire them up in the [[Map_Suite_WebAPI_Edition_Samples_Drawing_Editing|sample code.]]
  
map_suite_webapi_drawing_and_editing.1442561846.txt.gz · Last modified: 2015/09/18 07:37 by admin